Fix - initForm can be used also without arguments if server validation is not needed
This commit is contained in:
parent
eb2287f6e9
commit
09fe27fe2b
1 changed files with 2 additions and 2 deletions
|
@ -285,7 +285,7 @@ function withForm(target) {
|
||||||
inst.initForm = function(settings) {
|
inst.initForm = function(settings) {
|
||||||
const state = this.state || {};
|
const state = this.state || {};
|
||||||
state.formState = cleanFormState;
|
state.formState = cleanFormState;
|
||||||
state.formSettings = settings;
|
state.formSettings = settings || {};
|
||||||
this.state = state;
|
this.state = state;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ function withForm(target) {
|
||||||
};
|
};
|
||||||
|
|
||||||
inst.isFormServerValidated = function() {
|
inst.isFormServerValidated = function() {
|
||||||
return this.state.formSettings.serverValidation.changed.every(attr => this.state.formState.getIn(['data', attr, 'serverValidated']));
|
return !this.state.formSettings.serverValidation || this.state.formSettings.serverValidation.changed.every(attr => this.state.formState.getIn(['data', attr, 'serverValidated']));
|
||||||
};
|
};
|
||||||
|
|
||||||
inst.getFormStatusMessageText = function() {
|
inst.getFormStatusMessageText = function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue