-
I am running into a situation where the onRender is getting invoked multiple times for an action and I am hoping there may be a way to avoid this behavior. Here's the scenario: I've used the HTML Graphics panel to build a navigation panel for our suite of dashboards. There are several dynamic selectors that we want to pass from one dashboard to the next, so I defined a click event listener for each anchor record. The event handler then dynamically updates the anchor record href, adding the variable values to the URL query string as they exist at the moment the link was selected. The issue I am running into is that the onRender is sometimes getting called multiple times (but not always, there doesn't seem to be a predictable reason or pattern), so the variables get added multiple times. I know this is happening because I added an alert statement to display the value of the href and I can see the repeated values on the pop-ups after the first. Is there a known reason for the multiple invocations? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If there's multiple queries in the panel then each of those queries would cause a new rerender instead of a single rerender when all of them finish. |
Beta Was this translation helpful? Give feedback.
If there's multiple queries in the panel then each of those queries would cause a new rerender instead of a single rerender when all of them finish.
There's also some similar stuff with Grafana variables, but they tend to wait for the last variable (if they are linked) to change to cause a new rerender.