Skip to content

Commit

Permalink
small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ksercs committed Dec 23, 2024
1 parent 5e0c998 commit 56613cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,10 @@ const DropDownList = DropDownEditor.inherit({
return this.callBase(currentValue);
}

const that = this;
return this
._loadInputValue(
currentValue,
(...args) => { that._setSelectedItem(...args); },
(...args) => { this._setSelectedItem(...args); },
)
.always(this.callBase.bind(this, currentValue));
},
Expand Down
6 changes: 3 additions & 3 deletions packages/devextreme/js/__internal/ui/m_drop_down_box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ const DropDownBox = (DropDownEditor as any).inherit({
return sortedValues.map((x) => x.itemDisplayValue);
},

_renderInputValue(arg = {}) {
_renderInputValue({ renderOnly }: { renderOnly?: boolean } = {}) {
this._rejectValueLoading();
const values = [];

if (!this._dataSource) {
this.callBase({ ...arg, value: values });
this.callBase({ renderOnly, value: values });

return Deferred().resolve();
}
Expand Down Expand Up @@ -139,7 +139,7 @@ const DropDownBox = (DropDownEditor as any).inherit({
const orderedValues = this._sortValuesByKeysOrder(keys, values);
this.option('displayValue', orderedValues);
callBase({
...arg,
renderOnly,
value: values.length && orderedValues,
});
});
Expand Down

0 comments on commit 56613cb

Please sign in to comment.