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

VariableSelect: Multi select design update and behavior improvements #709

Merged
merged 4 commits into from May 8, 2024

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Apr 27, 2024

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

Copy link
Member

@dprokop dprokop left a 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

@torkelo
Copy link
Member Author

torkelo commented Apr 29, 2024

@dprokop updated the group by variable as well

Comment on lines +201 to +215
if (action === 'input-change') {
setInputValue(value);
if (model.onSearchChange) {
model.onSearchChange!(value);
}
: undefined;
return value;
}

if (action === 'input-blur') {
setInputValue('');
return '';
}

return inputValue;
};
Copy link
Member

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.

Copy link
Member Author

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

@torkelo torkelo requested a review from dprokop April 30, 2024 10:51
@torkelo torkelo merged commit 142cfba into main May 8, 2024
3 checks passed
@torkelo torkelo deleted the variable-select-improvements branch May 8, 2024 06:57
@grafanabot
Copy link
Contributor

🚀 PR was released in v4.17.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor 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