Hi,
Sorry if this is a trivial question or is at some point answered in the documentation. But I have been trying multiple ways of implementing these 2 methods and none seem to work right now. I’m trying to use this functionality in a miro board extension, the biggest problem is that my implementation worked on last friday, but when I tried to follow up on monday, I have this error every time: Uncaught TypeError: Cannot read property 'widgets' of undefined
My attempts to use these methods:
1)
let allWidgets = miro.board.widgets.get()
2)
let AllWidgetsOnBoard = Promise.resolve(miro.board.widgets.get({
"type" : "SHAPE"
})) //returns all widgets on board with shape type
AllWidgetsOnBoard.then(function(v) {
console.log("AllWidgetsOnBoard: ", AllWidgetsOnBoard)
})
3)
let allWidgets = miro.board.widgets.get().then(function() {
console.log("widgets on board: ", allWidgets)
})
console.log("widgets on board: ", allWidgets)
4)
return miro.board.widgets.create({
"type": "SHAPE",
"title": "Super Object",
"id" : "SuperObject",
"style": {
"backgroundColor": "#ff00ff"
}
})
On Friday miro.board.widgets.get() would give me a list of all widgets on the board so I really don’t understand what went wrong, Thanks for your time