I will hang a listener on the field. When changing the macro, I need to cancel the previous listener on this field and hang a new one.
How to do it?
I try like this:
client.off(`ticket.custom_field_${f.id}.changed`);
but this is a "joke"...
As a result, I have worked out the old listener and the new one.
The macros use the same form, so the field I'm listening to doesn't get deleted.