onChange(flags, changed, modified, changes) {
        flags = flags || {};
        let isChangeEventEmitted = false;
        if (this.parent?.subForm === this) {
          super.onChange({ ...flags, modified }, false);
        }
        else {
          super.onChange(flags, true);
        }
        const value = _.clone(this.submission);
        flags.changed = value.changed = changed;
        flags.changes = changes;

        if (modified && this.pristine) {
            this.pristine = false;
        }

        this.checkData(value.data, flags);
        const shouldValidate =
            !flags.noValidate ||
            flags.fromIframe ||
            (flags.fromSubmission && this.rootPristine && this.pristine && flags.changed);
        const errors = shouldValidate
            ? this.validate(value.data, {
                ...flags,
                noValidate: false,
                process: 'change'
            })
            : [];
        value.isValid = (errors || []).filter(err => !err.fromServer).length === 0;

        this.loading = false;
        if (this.submitted) {
            // show server errors while they are not cleaned/fixed
            const nonComponentServerErrors = _.filter(
                this.serverErrors || [],
                (err) => !err.component && !err.path
            );
            this.showErrors(nonComponentServerErrors.length ? nonComponentServerErrors : errors);
        }

        // See if we need to save the draft of the form.
        if (modified && this.options.saveDraft) {
            this.triggerSaveDraft();
        }

        if (!flags || !flags.noEmit) {
            this.emit('change', value, flags, modified);
            isChangeEventEmitted = true;
        }

        // The form is initialized after the first change event occurs.
        if (isChangeEventEmitted && !this.initialized) {
            this.emit('initialized');
            this.initialized = true;
        }
    }
Trigger the change event for this form.
@param {any} flags - The flags to set on this change event.
@param {any} changed - The changed object which reflects the changes in the form.
@param {boolean} modified - Whether or not the form has been modified.
@param {any} changes - The changes that have occured in the form.