Skip to content

Commit c690b97

Browse files
author
Ruslan Farkhutdinov
committed
DateBox: Move _hasEditorSpecificValidationError to a separate function
1 parent 43c3d63 commit c690b97

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/devextreme/js/__internal/ui/date_box/date_box.mask.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,13 +716,16 @@ class DateBoxMask extends DateBoxBase {
716716
return this._maskValue?.getTime() !== value?.getTime();
717717
}
718718

719-
_fireChangeEvent(): void {
719+
_hasEditorSpecificValidationError(): boolean {
720720
const { isValid, validationError } = this.option();
721-
const isInvalidEditorSpecific = !isValid && validationError?.editorSpecific;
722721

722+
return !isValid && Boolean(validationError?.editorSpecific);
723+
}
724+
725+
_fireChangeEvent(): void {
723726
this._clearSearchValue();
724727

725-
if (this._isValueDirty() || isInvalidEditorSpecific) {
728+
if (this._isValueDirty() || this._hasEditorSpecificValidationError()) {
726729
eventsEngine.triggerHandler(this._input(), { type: 'change' });
727730
}
728731
}

0 commit comments

Comments
 (0)