How to add panel menu options with React

Previously we were able to add our own panel options by binding a panel actions function:

this.events.on('init-panel-actions', this.onInitPanelActions.bind(this))

Does anyone know how to do this with the new React template?

The only relevant thing I can find is the PanelEvents.initPanelActions constant from @grafana/data.

Unfortunately, event handling support is limited for React plugins. But we’re working on improving it. If you want to follow the work on adding this, subscribe to this pull request.

1 Like