Skip to content

Commit 3d32908

Browse files
author
Andrei Vorobev
committed
Autocomplete, DropdownButton, DropdownBox: fix lint rules
1 parent 4ea5703 commit 3d32908

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

packages/devextreme/js/__internal/ui/drop_down_box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class DropDownBox<
310310
}),
311311
_ignoreFunctionValueDeprecation: true,
312312
// @ts-expect-error ts-error
313-
maxHeight: function () {
313+
maxHeight: function (): number | undefined {
314314
const popupLocation = this._popupPosition?.v.location;
315315

316316
return getElementMaxHeightByWindow(this.$element(), popupLocation);

packages/devextreme/js/__internal/ui/drop_down_button.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,30 +519,33 @@ class DropDownButton extends Widget<DropDownButtonProperties> {
519519
};
520520
}
521521

522-
_upDownKeyHandler() {
522+
_upDownKeyHandler(): boolean {
523523
if (this._popup?.option('visible') && this._list) {
524524
this._list.focus();
525525
} else {
526+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
526527
this.open();
527528
}
528529

529530
return true;
530531
}
531532

532-
_escHandler() {
533+
_escHandler(): boolean {
534+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
533535
this.close();
534536
this._buttonGroup.focus();
535537

536538
return true;
537539
}
538540

539-
_tabHandler() {
541+
_tabHandler(): boolean {
542+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
540543
this.close();
541544

542545
return true;
543546
}
544547

545-
_renderPopup() {
548+
_renderPopup(): void {
546549
const $popup = $('<div>');
547550
this.$element().append($popup);
548551
this._popup = this._createComponent($popup, Popup, this._popupOptions());
@@ -633,7 +636,11 @@ class DropDownButton extends Widget<DropDownButtonProperties> {
633636
this.$element().append($buttonGroup);
634637
}
635638

636-
this._buttonGroup = this._createComponent($buttonGroup, ButtonGroup, this._getButtonGroupOptions());
639+
this._buttonGroup = this._createComponent(
640+
$buttonGroup,
641+
ButtonGroup,
642+
this._getButtonGroupOptions(),
643+
);
637644

638645
this._buttonGroup.registerKeyHandler('downArrow', this._upDownKeyHandler.bind(this));
639646
this._buttonGroup.registerKeyHandler('tab', this._tabHandler.bind(this));
@@ -840,7 +847,7 @@ class DropDownButton extends Widget<DropDownButtonProperties> {
840847
case 'showArrowIcon':
841848
this._updateArrowClass();
842849
this._renderButtonGroup();
843-
this._popup && this._popup.repaint();
850+
this._popup?.repaint();
844851
break;
845852
case 'width':
846853
case 'height':

0 commit comments

Comments
 (0)