Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchKit - Fix clearing selection behavior #19686

Merged
merged 1 commit into from
Feb 27, 2021

Conversation

colemanw
Copy link
Member

Overview

This fixes the bug documented in https://lab.civicrm.org/dev/core/-/issues/2419

Before

After selecting all rows and updating search criteria, the rows would all still appear to be selected but the Actions menu would be disabled.

After

After selecting all (or any) rows and updating search criteria, the selection will be cleared (which was the original intent).

Technical Details

The variables allRowsSelected and selectedRows were sometimes getting out-of-sync.
This adds a function to help ensure they both get updated at the same time when the selection needs to be cleared.

The variables `allRowsSelected` and `selectedRows` were sometimes getting out-of-sync.
This adds a function to help ensure they both get updated at the same time when the selection needs to be cleared.
@civibot
Copy link

civibot bot commented Feb 27, 2021

(Standard links)

@civibot civibot bot added the master label Feb 27, 2021
@eileenmcnaughton
Copy link
Contributor

Yep tested this & it does what is says on the packet - good catch as this would be confusing

@eileenmcnaughton eileenmcnaughton merged commit e0a95fa into civicrm:master Feb 27, 2021
@eileenmcnaughton eileenmcnaughton deleted the searchKitClearSelection branch February 27, 2021 04:40
@dptarrant
Copy link

Yes, fixed. One small step for man ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants