Repository navigation
fix: label array/object variable options as JSON so the dropdown renders (#781) - #951
Merged
Merged
Conversation
…ers (#781) Variable queries returning an Array/Map/Tuple column (e.g. array_var in the clickhouse dashboard, SELECT DISTINCT [service_name, ' test array']) pushed the raw JS arrays as option text. The virtualized Select menu in @grafana/ui treats an option whose children are an array as an option group (SelectMenu.mjs: child.props.children.at(-1).props), so opening the variable dropdown crashed with "props.children.at(...).props is undefined". When a column holds arrays or objects, emit a text field with their JSON form for the label and a value field with the raw values. Grafana's QueryVariable reads text and value independently, so the selected value is still the array and keeps interpolating as a ClickHouse array literal (`[service_name, ' test array'] IN (${array_var})` works as before). Variables with scalar columns produce exactly the same frames as before.
…fix/781-complex-variable-values
…fix/781-complex-variable-values
Slach
requested changes
Nov 3, 2026
Slach
left a comment
Collaborator
There was a problem hiding this comment.
still have error
steps to reproduce
gh pr checkout 951
docker compose down
docker compose pull
docker volume rm clickhouse-grafana_node_modules
docker compose run --rm frontend_builder
docker compose run --rm backend_builder
docker compose run --rm plugin_signer
docker compose up -d grafana
press "array_var"
got the same error
An unexpected error happened
Details
TypeError: Cannot read properties of undefined (reading 'innerProps')
at v (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:195569)
at W (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:689211)
at div (<anonymous>)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:12857
at Menu (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:734362)
at B (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:723083)
at div (<anonymous>)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:12857
at MenuPortal (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:734683)
at div (<anonymous>)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:12857
at SelectContainer (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:737692)
at j (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:186002)
at p (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:696231)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:680620
at U (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:188310)
at K (<anonymous>)
at w (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:298873)
at E (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:300909)
at Q.Component (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:364648)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:128496
at div (<anonymous>)
at m (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:504447)
at H (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:478018)
at G (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:477627)
at div (<anonymous>)
at e3 (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:311949)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:128496
at div (<anonymous>)
at tc (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:347712)
at s (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:503662)
at div (<anonymous>)
at tL (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:355691)
at tN (<anonymous>)
at div (<anonymous>)
at V (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:29:92202)
at t2 (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:365461)
at http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:128496
at i (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:1:200308)
at eC (http://localhost:3000/public/build/97417.253edfc081798061.js:1:16718)
at default (<anonymous>)
at Suspense (<anonymous>)
at Suspense (<anonymous>)
at d (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:91610)
at ra (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:202418)
at rr (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:203387)
at L (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:654484)
at ea (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:660339)
at div (<anonymous>)
at http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:134073
at main (<anonymous>)
at div (<anonymous>)
at div (<anonymous>)
at div (<anonymous>)
at op (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:307555)
at oD (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:317164)
at oR (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:318236)
at u (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:66:98141)
at L (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:654484)
at ea (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:660339)
at eo (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:659707)
at ef (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:647966)
at _K (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:1:766779)
at t (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:667764)
at oA (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:318503)
at div (<anonymous>)
at o (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:90:24326)
at AT (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:29:52606)
at k (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:29:47764)
at AZ (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:9666)
at E (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:100492)
at t.KBarProvider (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:235940)
at f (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:91:87358)
at a (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:91:89122)
at N (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:55:90090)
at C (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:31:1018489)
at d (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:91610)
at http://localhost:3000/public/build/18631.e012edea7c7c9657.js:6:92266
at Y (http://localhost:3000/public/build/69375.1a6742753d23de1d.js:95:459)
at oL (http://localhost:3000/public/build/18631.e012edea7c7c9657.js:70:318994)
Collaborator
|
don't reproduce after cache clear let's merge it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #781