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

Select: Fixes issue preserving search term (input) when selecting a value #87013

Merged
merged 3 commits into from May 2, 2024

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Apr 27, 2024

Fixes an issue with preserving the search query & filtering after selecting a value, even after doing the correct onInputChange implementation according to the react select docs it did not work as our middleware implementation did not take into account scenarios where we want to preserve the search query after selection and always cleared the "hasInputValue" state which sets filterOption to null which disabled search filtering.

Related to grafana/scenes#709

@torkelo torkelo requested a review from a team as a code owner April 27, 2024 17:23
@torkelo torkelo requested review from L-M-K-B and eledobleefe and removed request for a team April 27, 2024 17:23
@torkelo torkelo added the backport v11.0.x Mark PR for automatic backport to v11.0.x label Apr 27, 2024
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.1.x milestone Apr 27, 2024
@torkelo torkelo modified the milestones: 11.1.x, 11.0.x Apr 27, 2024
Copy link
Contributor

Hello @torkelo!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

Copy link
Contributor

This PR must be merged before a backport PR will be created.

Copy link
Contributor

@L-M-K-B L-M-K-B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my point of view.

Copy link
Contributor

@tskarhed tskarhed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo, I presume

packages/grafana-ui/src/components/Select/SelectMenu.tsx Outdated Show resolved Hide resolved
packages/grafana-ui/src/components/Select/SelectMenu.tsx Outdated Show resolved Hide resolved
@torkelo torkelo requested a review from tskarhed April 30, 2024 12:42
@torkelo torkelo merged commit 281d785 into main May 2, 2024
22 checks passed
@torkelo torkelo deleted the select-clears-value-on-select-fix branch May 2, 2024 15:13
@grafana-delivery-bot grafana-delivery-bot bot modified the milestones: 11.0.x, 11.1.x May 2, 2024
grafana-delivery-bot bot pushed a commit that referenced this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🚀 Done
Status: 🚀 Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants