One way to do is, using the Dynamic Component extension by @yusufcihan
You can create a table arrangement with suppose
id= 1. Now inside that table arrangement, you can create a button with suppose
Any Button. Click event, you will get the id of the clicked button. Here for example, button with
id= btn1 is clicked, then now just replace the text ‘
btn’ from the button id which will have only ‘1’ left with you, which is in-turn the id of the table arrangement in which the button resides.
You create a table arrangement with
Inside this arrangement, you create a button with
Now under the
Any button. Click event, replace the text ‘btn’ with an empty text block from the text section in block editor.
This will return you with
id=1, which is in-turn an id of the table arrangement in which the clicked button is present.
This is the one way that I can think of. If you want, you can wait for more answer from other members.