I want to know if event listeners are available on connector events (creation, deletion and modifications. i.e. a user modified a connector connecting elements A and B to connect elements A and C) on a miro board. I am looking at the documetnation and the only relevant thing I can find is this: experimental:items:update Which says:
Currently, experimental:items:update fires only when items are moved on the board, when an item dimensions are resized, when an item is rotated on the board, and when updating the scale of an item. In the future, the event will also fire when updating other item data.
I read this as saying that connectors are not currently supported.
Is this correct or am I missing something in the documentation?
Thanks in advance
Page 1 / 1
Moderator note: Post moved to the Developer platform and APIs category.
An additional resource for these questions is the Miro Developer Platform Developer Discord server.
Hi @paulg,
Thanks for reaching out about this. I saw your message on our Discord too, so just sharing here as well.
At the moment, the experimental:items:update event listener in the Web SDK does not support updates to connectors. However, connectors are supported by the stable items:create and items:delete event listeners. So you can know when they're created or deleted. It's a great suggestion, however, to expand the support of the experimental:items:update event listener to include other board widgets like connectors. I'm happy to capture this feedback for the team.
Let me know if you have any other questions. Cheers! Will
Thanks for your response Will.
One follow up question as I cannot tell from the docs. Does the event listener for items:create and items:delete include which which board widgets the connectors were connected to? For example, if I have Element A and Element B and then I add a connector between A and B, will the items:create listener return the elements A and B?
Hey @paulg,
Great question.
Yes, the items:create event that is generated by the Web SDK when a connector is created will include a `start` and `end` object that contains the IDs of the start and end items the connector is connected to. It will look something like this:
This used to work with Web SDK v1 a few years ago. They removed this functionality unfortunately, breaking my app in the process 🤨.