Skip to main content

Hi, I’m trying to use bringForward() and sendBackward() Miro board functions which I found here: https://github.com/miroapp/app-examples/blob/master/miro.d.ts (line 351 - 357) I assumed this only needs the widget id’s in an array but when I tried with some test data it doesn’t actually change the widget “priority” AKA doesn’t send them forward or backwards. Tried something like this: `sendbackward(arrayOfWidgets)` where arrayOFWidgets were a few selected widgets from current board

Is there a specific use case that has to be done like with miro.board.commands , where they have to be in a miro on ready block? Or am I missing something else? 

 

Thanks for any suggestions

Hello Sami,

 

I just tried the bringForward() method and it works as expected. I piled up several card widgets on top of each other and then called bringForward with the ids of two widgets that were obscured by others. As expected, they were brought to the front with a call like:
 

miro.board.widgets.bringForward(d"3074457351646073464", "3074457351646197085"])


Calling sendBackward pushed them to the bottom of the pile of widgets.

I tested with card widgets. Are you experiencing this problem with a specific type of widget? If you could describe how to reproduce the issue, we can look into it.

And yes, you should put any calls to the SDK inside the onReady() callback:
https://developers.miro.com/docs/the-windowmiro-object#section-on-ready

Kind regards.

 

Daniela


Hello Sami,

 

I just tried the bringForward() method and it works as expected. I piled up several card widgets on top of each other and then called bringForward with the ids of two widgets that were obscured by others. As expected, they were brought to the front with a call like:
 

miro.board.widgets.bringForward(d"3074457351646073464", "3074457351646197085"])


Calling sendBackward pushed them to the bottom of the pile of widgets.

I tested with card widgets. Are you experiencing this problem with a specific type of widget? If you could describe how to reproduce the issue, we can look into it.

And yes, you should put any calls to the SDK inside the onReady() callback:
https://developers.miro.com/docs/the-windowmiro-object#section-on-ready

Kind regards.

 

Daniela

Hi, yes the onReady() callback seems to have been the issue, thanks a lot for your help


Reply