# Refresh the dashboard from the react panel plugin

**URL:** <https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255>\
**Category:** Grafana Plugin Development\
**Created:** [June 1, 2020, 1:57pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255 "2020-06-01T13:57:53Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![adriang](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@adriang](https://community.grafana.com/u/adriang)\
**Post date:** [June 1, 2020, 1:57pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/1 "2020-06-01T13:57:53Z")

</div>

There is any way to refresh dashboard from react panel plugin?

---

<div class="post-metadata">

**Author:** ![marcusolsson](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/marcusolsson/32/7922_2.png) [@marcusolsson](https://community.grafana.com/u/marcusolsson)\
**Post date:** [June 2, 2020, 3:58pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/2 "2020-06-02T15:58:24Z")

</div>

Hi! Could you share some more details on your use case? Why do you want to refresh the dashboard?

---

<div class="post-metadata">

**Author:** ![adriang](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@adriang](https://community.grafana.com/u/adriang)\
**Post date:** [June 3, 2020, 10:54am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/3 "2020-06-03T10:54:31Z")

</div>

Hi.

I develop my custom plugin in which we can send some value to the influx database. After pressing the send button, I would like the other plugins that display data from the database to be refreshed and show the current value.

---

<div class="post-metadata">

**Author:** ![marcusolsson](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/marcusolsson/32/7922_2.png) [@marcusolsson](https://community.grafana.com/u/marcusolsson)\
**Post date:** [June 3, 2020, 12:57pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/4 "2020-06-03T12:57:47Z")

</div>

Hm. I don’t believe think this is supported. My gut feeling tells me that full dashboard refresh is probably not something we expose to plugins, as it could potentially lead to poor experience. If this is something you’d still like to see, I’d recommend that you [submit an enhancement request](https://github.com/grafana/grafana/issues/new?labels=type%3A+feature+request&template=2-feature_request.md).

---

<div class="post-metadata">

**Author:** ![adriang](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@adriang](https://community.grafana.com/u/adriang)\
**Post date:** [June 3, 2020, 1:01pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/5 "2020-06-03T13:01:28Z")

</div>

Ok, thanks for help.

---

<div class="post-metadata">

**Author:** ![marcusolsson](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/marcusolsson/32/7922_2.png) [@marcusolsson](https://community.grafana.com/u/marcusolsson)\
**Post date:** [June 3, 2020, 1:47pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/6 "2020-06-03T13:47:17Z")

</div>

Did some research, and it seems like this was possible in Angular plugins by emitting a refresh event, but I don’t see the event emitter being exposed to React plugins. I’ll continue digging, and will update this topic once I know more.

---

<div class="post-metadata">

**Author:** ![marcusolsson](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/marcusolsson/32/7922_2.png) [@marcusolsson](https://community.grafana.com/u/marcusolsson)\
**Post date:** [June 4, 2020, 11:52am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/7 "2020-06-04T11:52:38Z")

</div>

Looks like event handling is still being worked on for React plugins:

> <https://github.com/grafana/grafana/pull/21010>

---

<div class="post-metadata">

**Author:** ![adriang](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@adriang](https://community.grafana.com/u/adriang)\
**Post date:** [June 23, 2020, 11:22am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/8 "2020-06-23T11:22:19Z")

</div>

I think I need some help. I don’t quite know how to use Event Bus in my component. The “@ grafana / data” module has no exported member similar to EventBus or EventBusSrv.

---

<div class="post-metadata">

**Author:** ![maemigh](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/maemigh/32/15141_2.png) [@maemigh](https://community.grafana.com/u/maemigh)\
**Post date:** [February 25, 2021, 10:11am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/9 "2021-02-25T10:11:41Z")

</div>

I’ve have accomplished this using  
`<a href="#" onclick="document.getElementsByClassName('btn btn--radius-right-0 navbar-button navbar-button--border-right-0')[0].click()">`  
inside a panel. Simple javascript that clicks the refresh button. Since this is possible, I’d think it would be worthwhile exposing as a better option.

---

<div class="post-metadata">

**Author:** ![mudu](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mudu](https://community.grafana.com/u/mudu)\
**Post date:** [January 13, 2022, 3:53pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/10 "2022-01-13T15:53:24Z")

</div>

Any news on this topic?

---

<div class="post-metadata">

**Author:** ![r34m1](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/r34m1/32/22211_2.png) [@r34m1](https://community.grafana.com/u/r34m1)\
**Post date:** [April 14, 2022, 12:29am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/11 "2022-04-14T00:29:37Z")

</div>

Hello @marcus, do we have any update on this feature?

---

<div class="post-metadata">

**Author:** ![nicolasdossantos248](https://avatars.discourse-cdn.com/v4/letter/n/ac8455/32.png) [@nicolasdossantos248](https://community.grafana.com/u/nicolasdossantos248)\
**Post date:** [March 14, 2023, 1:40pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/12 "2023-03-14T13:40:15Z")

</div>

Hello, is there any news ?

---

<div class="post-metadata">

**Author:** ![fercasjr](https://avatars.discourse-cdn.com/v4/letter/f/e495f1/32.png) [@fercasjr](https://community.grafana.com/u/fercasjr)\
**Post date:** [May 1, 2023, 3:42pm UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/13 "2023-05-01T15:42:00Z")

</div>

I know that the “Data manipulation” plugin from @mikhailvolkov , accomplishes this using locationService.reload(), I implemented a refresh condition using that plugin and if you just want to refresh the dashboard it does the job, I had a small issue because the Grafana variables in the template were not being “cleared”, they kept their last value instead of refreshing the query but I had a workaround using locationService.replace(currentPath), and refreshing again.

I hope it helps.

---

<div class="post-metadata">

**Author:** ![nicolasdossantos248](https://avatars.discourse-cdn.com/v4/letter/n/ac8455/32.png) [@nicolasdossantos248](https://community.grafana.com/u/nicolasdossantos248)\
**Post date:** [May 11, 2023, 9:41am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/14 "2023-05-11T09:41:27Z")

</div>

In my case I use RunQuery() in the QueryEditor. it refresh the dashboard without reloading the page.

---

<div class="post-metadata">

**Author:** ![academo](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@academo](https://community.grafana.com/u/academo)\
**Post date:** [May 12, 2023, 8:01am UTC](https://community.grafana.com/t/refresh-the-dashboard-from-the-react-panel-plugin/31255/15 "2023-05-12T08:01:03Z")

</div>

@nicolasdossantos248 RunQuery only reloads the specific panel the query is in, not all the dashboard.
