bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
9.37k stars 1.26k forks source link

Select all only reaches the first 500 items #2809

Open Firsh opened 3 years ago

Firsh commented 3 years ago

Describe the Bug

I just imported from LastPass and wanted to check if the number of imported entries match what I see in that. I have 583 entries, but it stops selecting after 500, even if I scroll all the way down (some lazyload maybe).

  1. Go to my vault,
  2. Cogwheel menu
  3. Select all.
  4. I choose the move option just because it tells me the number, and it shows just 500.

Expected Result

I'd like to really select all, for counting or actual moving.

Actual Result

Selection has an upper limit.

Environment

daanh99 commented 3 years ago

This appears to be expected behavior. I agree that it makes sense for a "Select all" button to actually select all items, rather than the first 500. However, in ciphers.compontent.ts a check is done to ensure that no more than a set amount of items is selected. This amount is set in the following variable on line 27 of said file:

const MaxCheckedCount = 500;

I think this might be done to prevent another bug which occurred when too many items were selected, or when too many items were either shared, moved or deleted, as those are the possible actions to perform on the selected items.

I propose to instead add a counter behind each category in the overview, like the chrome plugin already has. This way, the 500 limit does not need to be changed, and the total amount of items can be seen even easier than using the "Select All" button.

A screenshot of the count being displayed in the chrome plugin (in Dutch):

WhatsApp Image 2021-03-03 at 17 08 10

A3148475824 commented 3 years ago

一键删除全部不行?

vieira-temes commented 2 years ago

So how do I move ALL my items to an organization if I can't select more than 500?

l8nite commented 2 years ago

So how do I move ALL my items to an organization if I can't select more than 500?

I did this with some hacky code in the JS console:

checkboxStart=500; 
checkboxEnd=1000; 

// uncheck all checked
$$('input[type="checkbox"]').map (i => i.checked ? i.click() : i); 

// check the desired boxes from start to end
$$('input[type="checkbox"]').slice(checkboxStart, checkboxEnd).map(i => i.click())