Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

Using strings as events is deprecated and will be removed in a future version #5

Description

@enterprisebug

I am using the following command to generate my new Grafana project:

npx @grafana/toolkit plugin:create my-plugin

After deploying and browsing to the dashboard i see in the console:

Using strings as events is deprecated and will be removed in a future version. (init-edit-mode)
Using strings as events is deprecated and will be removed in a future version. (render)
Using strings as events is deprecated and will be removed in a future version. (data-error)

The code in the template looks like this:

this.events.on('init-edit-mode', this.onInitEditMode.bind(this));
this.events.on('render', this.onRender.bind(this));
this.events.on('data-error', this.onDataError.bind(this));

Hint
fix should be easy: use constants from `PanelEvents`` namespace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions