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) {
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) {