Trigger when a block is duplicated
-
I’m creating a custom block and one of it’s attribute is a unique id which doesn’t have any UI, so that’s not editable by the user. It’s created automatically by useEffect hook on the component startup if that attribute is not set. If I duplicate the block then the attribute is copied too which makes a duplicate id. Is there any way so that I can detect if a block is being duplicated and generate a unique id and overwrite the duplicate id with the generated one programmatically ?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Trigger when a block is duplicated’ is closed to new replies.