Issue #2000šŸ’¬ AnsweredOpened May 6, 2019by DylanSp1 reactions

What event is fired when a component's Id is changed?

Quick answerby DylanSpā¤ 1

After some experimentation and looking through the source, component:update:attributes is what's fired.

Read full answer below ↓

Question

I'd like to trigger some behavior when a component's Id is changed in the Settings panel. I've tried editor.on() with the following events:

  • component:update:id
  • component:update:Id
  • component:update:{id}
  • component:update:{Id}

following the documentation here for component:update:propertyName, but none of them trigger the callback (() => console.log("Testing")). What event should I listen to with editor.on()?

Answers (2)

DylanSp• May 6, 2019

After some experimentation and looking through the source, component:update:attributes is what's fired.

lock[bot]• May 6, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.