|
|
@ -112,6 +112,10 @@ class DialogForm extends Component { |
|
|
|
alert("Description cannot be empty!"); |
|
|
|
alert("Description cannot be empty!"); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.state.selectedMenu || this.state.selectedMenu === "") { |
|
|
|
|
|
|
|
alert("Default page cannot be empty!"); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleSave = () => { |
|
|
|
handleSave = () => { |
|
|
@ -216,6 +220,7 @@ class DialogForm extends Component { |
|
|
|
onChange={(e) => { |
|
|
|
onChange={(e) => { |
|
|
|
this.setState({ selectedMenu: e.target.value }); |
|
|
|
this.setState({ selectedMenu: e.target.value }); |
|
|
|
}}> |
|
|
|
}}> |
|
|
|
|
|
|
|
<option value="" selected disabled>Select default page</option> |
|
|
|
{this.state.menu.map((item) => ( |
|
|
|
{this.state.menu.map((item) => ( |
|
|
|
<option key={item.id} value={item.id}> |
|
|
|
<option key={item.id} value={item.id}> |
|
|
|
{item.name} |
|
|
|
{item.name} |
|
|
|