- unblocked saving call form partially;
This commit is contained in:
@@ -47,7 +47,8 @@ const BandoEdit = () => {
|
||||
//const values = formRef.current.getValues();
|
||||
//const diffData = equal(values, data);
|
||||
// TODO warn about unsaved data
|
||||
if (isFormValid) {
|
||||
goToStep(0);
|
||||
/*if (isFormValid) {
|
||||
goToStep(0)
|
||||
} else {
|
||||
bandoMsgs.current.show([
|
||||
@@ -58,7 +59,7 @@ const BandoEdit = () => {
|
||||
closable: true
|
||||
}
|
||||
]);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -67,12 +68,14 @@ const BandoEdit = () => {
|
||||
if (activeStep === 1) {
|
||||
return false
|
||||
}
|
||||
console.log('11');
|
||||
bandoMsgs.current.clear();
|
||||
const isFormValid = formRef.current.isFormValid();
|
||||
//const values = formRef.current.getValues();
|
||||
//const diffData = equal(values, data);
|
||||
// TODO warn about unsaved data
|
||||
if (isFormValid) {
|
||||
goToStep(1);
|
||||
/*if (isFormValid) {
|
||||
goToStep(1);
|
||||
} else {
|
||||
bandoMsgs.current.show([
|
||||
@@ -83,7 +86,7 @@ const BandoEdit = () => {
|
||||
closable: true
|
||||
}
|
||||
]);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -235,8 +238,7 @@ const BandoEdit = () => {
|
||||
|
||||
if (bandoId === 0) {
|
||||
setData({
|
||||
status: 'draft',
|
||||
name: ''
|
||||
status: null
|
||||
});
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
|
||||
@@ -293,7 +295,7 @@ const BandoEdit = () => {
|
||||
? <Steps
|
||||
model={stepItems}
|
||||
activeIndex={activeStep}
|
||||
readOnly={false}/>
|
||||
readOnly={isNil(data.status)}/>
|
||||
: null}
|
||||
<BlockingOverlay shouldDisplay={isAsyncRequest}/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user