effect: validation for configuration
This commit is contained in:
parent
7b3d63faa2
commit
743bb2b8f1
@ -1471,6 +1471,23 @@ const reactionEffects: IReactionEffect[] = [
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { configuration } = calculationStore.values;
|
||||
const { selectConfiguration } = calculationStore.options;
|
||||
return [configuration, selectConfiguration];
|
||||
},
|
||||
effect: ([configurationId, selectConfigurationOptions]) => {
|
||||
if (selectConfigurationOptions.length) {
|
||||
if (!configurationId) {
|
||||
calculationStore.setValidation('selectConfiguration', false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
calculationStore.setValidation('selectConfiguration', true);
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { model, configuration } = calculationStore.values;
|
||||
|
||||
Reference in New Issue
Block a user