meteostat / meteostat-grafana

Grafana plugin for accessing historical weather and climate data using the Meteostat JSON API.
Apache License 2.0
9 stars 2 forks source link

Update query editor to use new form components #7

Closed marcusolsson closed 3 years ago

marcusolsson commented 3 years ago

This PR removes the legacy form components in favor of the inline field components. For more information: https://developers.grafana.com/ui/latest/index.html?path=/story/forms-inlinefieldrow--single

It also changes from multiple Select component to a single MultiSelect component.

Screen Shot 2020-12-02 at 12 28 24

Feel free to pick any of the changes (if any). If you'd like to keep the previous one-Select-per-row, I recommend that you use non-primary colors. Here's an example for inspiration: https://github.com/marcusolsson/grafana-csv-datasource/blob/6acc1429a79cd681259cf56f1bc64d7f76a5bfc0/src/SchemaEditor.tsx#L64-L69

Kkoile commented 3 years ago

Thanks for opening this pull request! Unfortunately, I can't get it running. I always receive the following error message: https://reactjs.org/docs/error-decoder.html/?invariant=130&args[]=undefined&args[]= I tried a lot of things to get around this error, but can't even find the origin.

Do you know where this error comes from? Did you perhaps forgot to commit another file?

marcusolsson commented 3 years ago

Sorry, my bad. The new form components require >=7.3.0. I'll let you decide whether to use the new form components, or to stay compatible with versions <7.3.0

Kkoile commented 3 years ago

It is working now. Thanks for contributing and removing the legacy ui components