How to refresh custom panel to get the latest value from data source

Created a custom panel plugin in grafana using react. In the data source have added a query. When changing the query condition the custom panel doesn’t refresh with the latest data and the old value of the data source is only retained. How to emit the refresh on click of ‘Apply’ . Also, can you help on clicking the refresh button in the grafana to load the latest data from data prop into the custom panel ?

2 Likes