Skip to content

Commit 88223d0

Browse files
author
marker dao ®
committed
TextEditorBase: Improve typing && Refactor
1 parent 9d1c983 commit 88223d0

5 files changed

Lines changed: 181 additions & 115 deletions

File tree

packages/devextreme/js/__internal/ui/chat/message_box/chat_text_area.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ class ChatTextArea extends TextArea<Properties> {
584584
return maxHeight;
585585
}
586586

587-
_keyPressHandler(e: InputEvent): void {
587+
_keyPressHandler(e: { originalEvent: InputEvent & KeyboardEvent }): void {
588588
super._keyPressHandler(e);
589589

590590
this._updateButtonsState();

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { extend } from '@js/core/utils/extend';
1212
import { inputType } from '@js/core/utils/support';
1313
import { isDate as isDateType, isNumeric, isString } from '@js/core/utils/type';
1414
import { getWindow, hasWindow } from '@js/core/utils/window';
15-
import type { DxEvent, InteractionEvent } from '@js/events';
15+
import type { InteractionEvent } from '@js/events';
1616
import type {
1717
DateLike,
1818
DatePickerType,
@@ -22,6 +22,7 @@ import type {
2222
import type { ToolbarItem } from '@js/ui/popup';
2323
import type { OptionChanged } from '@ts/core/widget/types';
2424
import DropDownEditor from '@ts/ui/drop_down_editor/m_drop_down_editor';
25+
import type { ValueChangedEvent } from '@ts/ui/editor/editor';
2526

2627
import type { PopupProperties } from '../popup/m_popup';
2728
import uiDateUtils from './date_utils';
@@ -466,7 +467,7 @@ class DateBox extends DropDownEditor<DateBoxBaseProperties> {
466467
}
467468
}
468469

469-
_clearValueHandler(e: DxEvent): void {
470+
_clearValueHandler(e: ValueChangedEvent & { stopPropagation: () => void }): void {
470471
this.option('text', '');
471472
super._clearValueHandler(e);
472473
}

0 commit comments

Comments
 (0)