-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi - We're having problems getting the grid to redraw on changes to the layout prop.
We've got some code that dynamically sets the height of the grid e.g.
this.layout[index].position.h = this.howeverManyRowsNeeded(component.$el)
However, the current watcher fails to notice the change as it's not watching the positions keys within the layout array.
watch: {
layout (newLayout) {
if (this.fixLayoutOnLoad) {
if (utils.layoutHasCollisions(newLayout)) {
this.updateLayout(utils.fixLayout(newLayout, this.bubbleUp))
}
}
}
}To resolve this you'd need to enable deepWatching you could do this by telling the watcher to use deep watching e.g.
watch: {
layout: {
handler(newLayout) {
if (this.fixLayoutOnLoad) {
if (utils.layoutHasCollisions(newLayout)) {
this.updateLayout(utils.fixLayout(newLayout, this.bubbleUp))
}
}
},
deep: true
}
}lih1989, willCode2Surf and ric-h
Metadata
Metadata
Assignees
Labels
No labels