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
VariableSelect: Multi select design update and behavior improvements #709
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it and works nice! Can we add it to the group by variable as well? It's the same interaction as multi value variable
@dprokop updated the group by variable as well |
if (action === 'input-change') { | ||
setInputValue(value); | ||
if (model.onSearchChange) { | ||
model.onSearchChange!(value); | ||
} | ||
: undefined; | ||
return value; | ||
} | ||
|
||
if (action === 'input-blur') { | ||
setInputValue(''); | ||
return ''; | ||
} | ||
|
||
return inputValue; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to have a different effect compared to i.e. QueryVariable - selecting value (with Enter) also clears the search string, so that the list is no longer filtered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dprokop missed setting inputValue={inputValue}
on the Select.
But to really fix the issue of search not clearing you need to be on this branch in main grafana/grafana#87013
🚀 PR was released in |
Variables---Demos---Scenes-Test-App---Apps---Grafana.mp4
📦 Published PR as canary version:
4.14.0--canary.709.8892811931.0
✨ Test out this PR locally via:
npm install @grafana/scenes@4.14.0--canary.709.8892811931.0 # or yarn add @grafana/scenes@4.14.0--canary.709.8892811931.0