If you change the name of the instance by calling the rename function, the documentchange
event will fire and indicate that the name
property has been changed, but if you undo/redo, this event will not fire.
Steps to reproduce:
- Place an instance of any component on the canvas, or select an existing one.
- Run the plugin with the
documentchange
event listener.
figma.on(
'documentchange',
({documentChanges}) => {
console.log(documentChanges)
}
);
- Change the name of the selected instance using Figma’s native rename function.
- Undo and redo the last action.
Expected result:
The documentchange
event will fire and print an array of objects to the console.
Actual result:
The documentchange
event does not fire.