[dashboard] give user feedback when there are unsaved changes (#1633)

* show alert and use dialog window if there are unsaved changes.

* add container class to alert
This commit is contained in:
Alanna Scott
2016-11-18 09:37:01 -08:00
committed by GitHub
parent d5ef937b31
commit ab5a4102cd
3 changed files with 41 additions and 0 deletions

View File

@@ -48,10 +48,12 @@ class GridLayout extends React.Component {
if (oldItem.w !== newItem.w || oldItem.h !== newItem.h) {
this.setState({ layout }, () => newSlice.resize());
}
this.props.dashboard.onChange();
}
onDragStop(layout) {
this.setState({ layout });
this.props.dashboard.onChange();
}
removeSlice(sliceId) {
@@ -64,6 +66,7 @@ class GridLayout extends React.Component {
return slice.slice_id !== sliceId;
}),
});
this.props.dashboard.onChange();
}
serialize() {