grafana / timestream-datasource

Amazon Timestream in Grafana
https://grafana.com/grafana/plugins/grafana-timestream-datasource
Apache License 2.0
23 stars 19 forks source link

Query Editor: Stop running query automatically when all macros are selected #269

Closed idastambuk closed 8 months ago

idastambuk commented 8 months ago

This PR in main grafana introduced the bug where onRunQuery function is getting redefined and therefore triggers the useEffect and an infinite loop (reported here). The quickest fix is just removing this effect, since we don't want to run query automatically anyway. Furthermore, when the user opens the editor, and selects all the macros, they might not even have anything in the SQL editor, so we don't want to trigger it anyway.

Also fixed another useEffect typo (I think?) if (!database || !table || !table) {