refactor 'select all/clear all selections' methods out of GridBar, into Grid #1740
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale
While investigating failures in biologics test automation, I noticed that
GridBar.clearAllSelections
has an issue that causes it to no-op silently if there isn't a button containing 'Clear' already present. Thinking it would be a simple matter of waiting for it to appear, I added that wait- and discovered that the check for its presence was looking within theGridBar
, when the 'Clear' button is now located outside of that, in the 'selection-status' element, which contains the select-all and clear-all buttons.Investigating further, I noted that
QueryGrid.clearAllSelections
checks to see if the current grid is aGridPanel
(versus being aQueryGridPanel
)- and only calls intoGridBar.clearAllSelections
if it is the latter. (IIRC,QueryGridPanel
was to be deprecated).If QGP is in fact deprecated (@labkey-alan, is this the case?) we should probably remove
GridBar's ``clearAllSelections
method now and refactor its usages toQueryGrid
'sclearAllSelections
.If not, the change in this PR updates
GridBar
'sclearAllSelections
to function regardless of whether the current grid is a QueryGrid, by finding the 'Clear' button in the QueryGrid's componentElementRelated Pull Requests
related changes in biologics
https://github.com/LabKey/biologics/pull/2554
Changes
find the button in the QueryGrid component instead of the GridBar