"Add guard clause in onLayoutChange callback"
If not provided with a position change handler don't send a resquest to persist updated layout position. We must do this until we resolve how we are going to persist changes to precanned dashboards.pull/10616/head
parent
53005e715b
commit
98386d2995
|
@ -126,6 +126,11 @@ export const LayoutRenderer = React.createClass({
|
|||
|
||||
handleLayoutChange(layout) {
|
||||
this.triggerWindowResize()
|
||||
|
||||
if (!this.props.onPositionChange) {
|
||||
return
|
||||
}
|
||||
|
||||
const newCells = this.props.cells.map((cell) => {
|
||||
const l = layout.find((ly) => ly.i === cell.i)
|
||||
const newLayout = {x: l.x, y: l.y, h: l.h, w: l.w}
|
||||
|
|
Loading…
Reference in New Issue