Skip to content

Commit

Permalink
fix(examples): Add onLayoutChange defaultProp, fixes react-grid-layou…
Browse files Browse the repository at this point in the history
…t#433

Use case appears to be copy/paste
  • Loading branch information
STRML committed Feb 23, 2017
1 parent 9898198 commit 03b64c9
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/examples/0-showcase.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ShowcaseLayout extends React.Component {
static defaultProps = {
className: "layout",
rowHeight: 30,
onLayoutChange: function() {},
cols: {lg: 12, md: 10, sm: 6, xs: 4, xxs: 2},
initialLayout: generateLayout()
};
Expand Down
1 change: 1 addition & 0 deletions test/examples/1-basic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var BasicLayout = React.createClass({
className: "layout",
items: 20,
rowHeight: 30,
onLayoutChange: function() {},
cols: 12
};
},
Expand Down
1 change: 1 addition & 0 deletions test/examples/10-dynamic-min-max-wh.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var DynamicMinMaxLayout = React.createClass({
isResizable: true,
items: 20,
rowHeight: 30,
onLayoutChange: function() {},
cols: 12,
};
},
Expand Down
1 change: 1 addition & 0 deletions test/examples/11-no-vertical-compact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var NoCompactingLayout = React.createClass({
items: 50,
cols: 12,
rowHeight: 30,
onLayoutChange: function() {},
// This turns off compaction so you can place items wherever.
verticalCompact: false
};
Expand Down
3 changes: 2 additions & 1 deletion test/examples/2-no-dragging.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ var NoDraggingLayout = React.createClass({
isResizable: false,
items: 50,
cols: 12,
rowHeight: 30
rowHeight: 30,
onLayoutChange: function() {},
};
},

Expand Down
1 change: 1 addition & 0 deletions test/examples/3-messy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var MessyLayout = React.createClass({
className: "layout",
items: 20,
rowHeight: 30,
onLayoutChange: function() {},
cols: 12
};
},
Expand Down
1 change: 1 addition & 0 deletions test/examples/4-grid-property.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var GridPropertyLayout = React.createClass({
isResizable: true,
items: 20,
rowHeight: 30,
onLayoutChange: function() {},
cols: 12,
};
},
Expand Down
3 changes: 2 additions & 1 deletion test/examples/7-localstorage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ var LocalStorageLayout = React.createClass({
return {
className: "layout",
cols: 12,
rowHeight: 30
rowHeight: 30,
onLayoutChange: function() {},
};
},

Expand Down
3 changes: 2 additions & 1 deletion test/examples/8-localstorage-responsive.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ var ResponsiveLocalStorageLayout = React.createClass({
return {
className: "layout",
cols: {lg: 12, md: 10, sm: 6, xs: 4, xxs: 2},
rowHeight: 30
rowHeight: 30,
onLayoutChange: function() {},
};
},

Expand Down
1 change: 1 addition & 0 deletions test/examples/9-min-max-wh.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var MinMaxLayout = React.createClass({
isResizable: true,
items: 20,
rowHeight: 30,
onLayoutChange: function() {},
cols: 12,
};
},
Expand Down

0 comments on commit 03b64c9

Please sign in to comment.