I am trying to create a plugin, where i have to look for refresh event of dashboard to trigger my function, but no sample or reference on how to use PanelEvents namespace for react plugin. Any leads or reference will be much helpful
The same for me here, I’d like to get ‘refresh’ event into a React Panel Plugin in order to update timeRange from the begining of the day until ‘now’ but I can’t find doc to do that.
React panels refresh whenever there have been any changes to the inputs, for example the query result or the current timeRange. Both of these properties are available in the props for the React component (
If you’d like to update the time range from a panel, you can use the
onChangeTimeRange, which also is available from the panel props. Here’s an example from one of my own plugins.
Thank you @marcusolsson, with the help of your answer, my panel now run like required