grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

Now works with custom value preserved #764

Closed torkelo closed 3 months ago

torkelo commented 3 months ago

Merges into https://github.com/grafana/scenes/pull/763

Adds the behavior to preserve custom value input value when opening the Select after adding a custom value.

With this change we can completely revert https://github.com/grafana/grafana/pull/87843 (and do not need https://github.com/grafana/grafana/pull/88601)

torkelo commented 3 months ago

e.g. if you add a custom adhoc value, save the dashboard with that variable value, refresh the page then click the adhoc value select this won't restore the input text. are we concerned about that case?

@ashharrison90 I don't think so, I am more concerned with the use case of taking a long value say My very long region name and sub name and selecting that and wanting to change it, to so say. My very long region name .*

But can't think of how to solve that one (other than keeping the current value selected and focused so if you start typing it will be cleared, but for that we need deep access to the input element)