Skip to content

Commit 03b64c9

Browse files
committed
fix(examples): Add onLayoutChange defaultProp, fixes react-grid-layout#433
Use case appears to be copy/paste
1 parent 9898198 commit 03b64c9

10 files changed

+13
-3
lines changed

test/examples/0-showcase.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class ShowcaseLayout extends React.Component {
1212
static defaultProps = {
1313
className: "layout",
1414
rowHeight: 30,
15+
onLayoutChange: function() {},
1516
cols: {lg: 12, md: 10, sm: 6, xs: 4, xxs: 2},
1617
initialLayout: generateLayout()
1718
};

test/examples/1-basic.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var BasicLayout = React.createClass({
1919
className: "layout",
2020
items: 20,
2121
rowHeight: 30,
22+
onLayoutChange: function() {},
2223
cols: 12
2324
};
2425
},

test/examples/10-dynamic-min-max-wh.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var DynamicMinMaxLayout = React.createClass({
2121
isResizable: true,
2222
items: 20,
2323
rowHeight: 30,
24+
onLayoutChange: function() {},
2425
cols: 12,
2526
};
2627
},

test/examples/11-no-vertical-compact.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var NoCompactingLayout = React.createClass({
1919
items: 50,
2020
cols: 12,
2121
rowHeight: 30,
22+
onLayoutChange: function() {},
2223
// This turns off compaction so you can place items wherever.
2324
verticalCompact: false
2425
};

test/examples/2-no-dragging.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ var NoDraggingLayout = React.createClass({
2020
isResizable: false,
2121
items: 50,
2222
cols: 12,
23-
rowHeight: 30
23+
rowHeight: 30,
24+
onLayoutChange: function() {},
2425
};
2526
},
2627

test/examples/3-messy.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var MessyLayout = React.createClass({
1818
className: "layout",
1919
items: 20,
2020
rowHeight: 30,
21+
onLayoutChange: function() {},
2122
cols: 12
2223
};
2324
},

test/examples/4-grid-property.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var GridPropertyLayout = React.createClass({
1515
isResizable: true,
1616
items: 20,
1717
rowHeight: 30,
18+
onLayoutChange: function() {},
1819
cols: 12,
1920
};
2021
},

test/examples/7-localstorage.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ var LocalStorageLayout = React.createClass({
1616
return {
1717
className: "layout",
1818
cols: 12,
19-
rowHeight: 30
19+
rowHeight: 30,
20+
onLayoutChange: function() {},
2021
};
2122
},
2223

test/examples/8-localstorage-responsive.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ var ResponsiveLocalStorageLayout = React.createClass({
1616
return {
1717
className: "layout",
1818
cols: {lg: 12, md: 10, sm: 6, xs: 4, xxs: 2},
19-
rowHeight: 30
19+
rowHeight: 30,
20+
onLayoutChange: function() {},
2021
};
2122
},
2223

test/examples/9-min-max-wh.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var MinMaxLayout = React.createClass({
1515
isResizable: true,
1616
items: 20,
1717
rowHeight: 30,
18+
onLayoutChange: function() {},
1819
cols: 12,
1920
};
2021
},

0 commit comments

Comments
 (0)