Fix title bug in list modal UI

This commit is contained in:
Kailash Nadh 2020-02-03 13:33:23 +05:30
parent 022b35c4a7
commit ab8bac226f
1 changed files with 2 additions and 1 deletions

View File

@ -93,6 +93,7 @@ class CreateFormDef extends React.PureComponent {
} }
modalTitle(formType, record) { modalTitle(formType, record) {
console.log(formType)
if (formType === cs.FormCreate) { if (formType === cs.FormCreate) {
return "Create a list" return "Create a list"
} }
@ -131,7 +132,7 @@ class CreateFormDef extends React.PureComponent {
return ( return (
<Modal <Modal
visible={true} visible={true}
title={this.modalTitle(this.state.form, record)} title={this.modalTitle(formType, record)}
okText={this.state.form === cs.FormCreate ? "Create" : "Save"} okText={this.state.form === cs.FormCreate ? "Create" : "Save"}
confirmLoading={this.state.modalWaiting} confirmLoading={this.state.modalWaiting}
onCancel={onClose} onCancel={onClose}