systelab / systelab-components

Systelab Angular common components
MIT License
14 stars 8 forks source link

Two-list "Add all" and "Remove all" counters not consistent with the number of actually listed items when filtered #877

Open Franek75 opened 2 months ago

Franek75 commented 2 months ago

Describe the bug In two-list component, when the Available Fields or Fields To Show list is filtered, the counter of the corresponding "Add All"/"Remove all" link is not updated, and displays the total amount of available/visible items. Thus, when "Add All" or "Remove All" is clicked, the number of items moved to the other list does not match the value of that counter.

To Reproduce Steps to reproduce the behavior:

  1. Go to a screen with a two-list component
  2. Supposing that M items are listed in Available Fields, set the list filter to a value so that N<M items are listed
  3. See that link states "Add all (M)" (it should be "Add all (N)"
  4. Click "Add all". N items are moved to Visible list.
  5. Do the same with the Fields To Show and the "Remove all" link

Expected behavior The counters of "Add All (...)" and "Remove All (...)" links should match the number of items that are being actually listed at that moment.

Screenshots 141-245_S2_AddAllCounterWhenFiltered 141-245_S2_RemoveAllCounterWhenFiltered

Desktop (please complete the following information):

Additional context Add any other context about the problem here.