I have a plugin that deals with saving node ids into my Figma file. I have some functions that update my save data when :
i) a node is deleted when my plugin is running
ii) the node is already removed when the plugin is launched
I’m having some issues with components and their child nodes at the moment. When I delete a component while my plugin is running, the component and its children don’t seem to trigger any documentChange delete events.
Also, if I delete my component then launch my plugin, Figma doesn’t seem to flag its child nodes as deleted ie node.removed is still false, getNodeById(node.id) is not null even though the child node is already gone from the Figma file.
This happens whether I soft-delete ie delete the component but keep any instances to it, or hard-delete aka delete component and all its instances.
Stranger still, Figma does kinda register that I deleted my component i.e. component node and its children don’t show up when I call figma.root.findAll()
Is this behaviour a bug, or is this intended for components?