Skip to content

Commit 89f8c3d

Browse files
author
marker dao ®
committed
feat(colorBox): Update types
1 parent c667dfd commit 89f8c3d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/devextreme/js/__internal/ui/color_box/m_color_box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class ColorBox extends DropDownEditor<ColorBoxProperties> {
224224
const color = new Color(newValue);
225225

226226
if (color.colorIsInvalid) {
227-
this._input().val(oldValue);
227+
this._input().val(oldValue === null ? undefined : oldValue);
228228
return;
229229
}
230230
// @ts-expect-error ts-error

packages/devextreme/js/__internal/ui/color_box/m_color_view.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const BLACK_COLOR = '#000000';
6767
export interface ColorViewProperties extends EditorProperties {
6868
keyStep?: number;
6969

70-
matchValue?: string;
70+
matchValue?: string | null;
7171

7272
editAlphaChannel?: boolean;
7373

@@ -299,7 +299,6 @@ class ColorView extends Editor<ColorViewProperties> {
299299
return {
300300
...super._getDefaultOptions(),
301301
value: null,
302-
// @ts-expect-error ts-error
303302
matchValue: null,
304303
onEnterKeyPressed: undefined,
305304
editAlphaChannel: false,

0 commit comments

Comments
 (0)