Readd save dialog on section change

This commit is contained in:
Chi Vinh Le
2018-05-01 18:14:07 +02:00
parent 68b1670a55
commit 74821a4d4c
@@ -49,7 +49,13 @@ class ConfigureContainer extends React.Component {
handleSectionChange = async section => {
const nextRoute = `/admin/configure/${section}`;
this.props.router.push(nextRoute);
if (this.hasPendingData()) {
this.nextRoute = nextRoute;
this.props.showSaveDialog();
} else {
// Just go to the section
this.props.router.push(nextRoute);
}
};
navigationPrompt = e => {