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

AdHoc filters: Apply isKeysOpen state changes synchronously #722

Merged
merged 3 commits into from
May 8, 2024

Conversation

ashharrison90
Copy link
Contributor

@ashharrison90 ashharrison90 commented May 7, 2024

  • changes keySelect to set isKeysOpen synchronously as soon as the onOpenMenu/onCloseMenu callbacks are called
  • if this is set asynchronously once the options are resolved, can potentially cause issues with slow connections. example:
    • throttle connection to slooooooow
    • take a configured filter (with key + value)
    • open the key dropdown
    • click outside to close the key dropdown
    • open the value dropdown
    • click outside to close the value dropdown
    • wait for everything to resolve
    • expected: dropdowns remain closed
    • (haven't tested this, but) i think actually both dropdowns will be open, which shouldn't be possible and could cause any manner of issues

Fixes https://github.com/grafana/hyperion-planning/issues/28

📦 Published PR as canary version: 4.14.3--canary.722.8989150174.0

✨ Test out this PR locally via:

npm install @grafana/scenes@4.14.3--canary.722.8989150174.0
# or 
yarn add @grafana/scenes@4.14.3--canary.722.8989150174.0

@ashharrison90 ashharrison90 added patch Increment the patch version when merged release Create a release when this pr is merged labels May 7, 2024
@ashharrison90 ashharrison90 requested a review from dprokop May 7, 2024 14:35
@ashharrison90 ashharrison90 self-assigned this May 7, 2024
@ashharrison90 ashharrison90 merged commit da77a3f into main May 8, 2024
3 checks passed
@ashharrison90 ashharrison90 deleted the ash/make-menu-state-synchronous branch May 8, 2024 08:29
@grafanabot
Copy link
Contributor

🚀 PR was released in v4.17.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants