[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

@@ -59,6 +59,7 @@ class Controls extends React.PureComponent {
data: JSON.stringify(data),
},
success() {
dashboard.onSave();
showModal({
title: 'Success',
body: 'This dashboard was saved successfully.',
@@ -75,6 +76,7 @@ class Controls extends React.PureComponent {
}
changeCss(css) {
this.setState({ css });
this.props.dashboard.onChange();
}
render() {
const dashboard = this.props.dashboard;