-
Notifications
You must be signed in to change notification settings - Fork 28
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
Template Variables: Use Combobox behind toggle #1011
base: main
Are you sure you want to change the base?
Conversation
packages/scenes/src/variables/components/VariableValueSelect.tsx
Outdated
Show resolved
Hide resolved
|
||
return ( | ||
<Combobox | ||
id={'var-' + key} |
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.
Not sure where this var-
is added for the Select
let comboboxOptions = options.map((o) => ({ value: o.value.toString(), label: o.label })); | ||
|
||
if (includeAll) { | ||
comboboxOptions.unshift({ value: ALL_VARIABLE_VALUE, label: ALL_VARIABLE_TEXT }); |
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.
Are custom All values handled somewhere else?
function VariableValueCombobox({ model }: SceneComponentProps<MultiValueVariable>) { | ||
const { value, key, options, includeAll, isReadOnly, allowCustomValue = true } = model.useState(); | ||
|
||
let comboboxOptions = options.map((o) => ({ value: o.value.toString(), label: o.label })); |
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.
Do options always have a label in this context?
It turns out that Combobox actually isn't exported until 11.5. I would really appreciate some feedback on the way of handling feature toggling here. This PR will likely be WIP until mid-January.
Try running with grafana/ui at
11.5.0-214403
.