Fix behavior of multiselect in list view#3161
Conversation
Hide multiselectaction buttons when selection is resetted after a action is performed Use checked prop instead of attr to show/hide triggered selection when box was clicked by a user before
|
@pbankonier nice! |
|
@rhtyd @rafaelweingartner @GabrielBrascher can take a look :) |
|
Couldn't reproduce this with 4.11.2, likely an issue on master due to jquery version change. |
Yes it is related to the jquery version update. |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Code LGTM, additionally I tested and it works.
Thanks @pbankonier
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM, no need for marvin tests since it's in the UI only
|
@rhtyd can we merge it? can you have a look? 👍 |
|
@svenvogel The master branch is in freeze state due to the 4.12 releasing process. As soon as we have master open for merging we can merge this one. Thanks! |
|
@GabrielBrascher okay i see! thanks for the info. |
Hide multiselectaction buttons when selection is resetted after a action is performed Use checked prop instead of attr to show/hide triggered selection when box was clicked by a user before. How to reproduce: Select one entry in a multiSelect listView (e.g. instance list) and then deselect it again. Now click on the "select all" checkbox. The entries which were clicked previously are not displayed as selected. Select at least one entry. Use the multiSelectAction buttons to trigger an action. Wait for completion. The list refreshes and no entry is selected but the multiSelectAction buttons are displayed. Fix: Use "checked" property instead of the attribute to select all entries. This is necessary because when you checked an entry by clicking on it the property gets set and the browser is preferably using this. So setting the attribute by clicking on the "select all" checkbox had no impact anymore on the checkBox of the previously clicked entries. Hide the multiSelectAction buttons when the list is refreshed after an action is performed and no element is selected anymore.
|
@pbankonier please see @weizhouapache 's remarks in the linked issue above #3827. Can you have a look? |
This fixes the issue that cannot assign VMs in Internal LB in VPC. listView is overwritten due to commit 2e2b670 (apache#3161) Fixes: apache#3827
Description
How to reproduce:
Select one entry in a multiSelect listView (e.g. instance list) and then deselect it again. Now click on the "select all" checkbox. The entries which were clicked previously are not displayed as selected.
Select at least one entry. Use the multiSelectAction buttons to trigger an action. Wait for completion. The list refreshes and no entry is selected but the multiSelectAction buttons are displayed.
Fix:
Use "checked" property instead of the attribute to select all entries. This is necessary because when you checked an entry by clicking on it the property gets set and the browser is preferably using this. So setting the attribute by clicking on the "select all" checkbox had no impact anymore on the checkBox of the previously clicked entries.
Hide the multiSelectAction buttons when the list is refreshed after an action is performed and no element is selected anymore.
Types of changes
How Has This Been Tested?
Deployed to our test environment and tested functionality.