Skip to content

Commit

Permalink
fix(combobox): remove alwaysFilter option (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
saiponnada authored Jan 17, 2025
1 parent 72b3adb commit c84b6d4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions docs/ui/makeup-combobox/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-combobox/index.min.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions packages/ui/makeup-combobox/dist/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const defaultOptions = {
autoSelect: true,
collapseTimeout: 150,
customElementMode: false,
autoScroll: true,
alwaysFilter: true
autoScroll: true
};
class _default {
constructor(widgetEl, selectedOptions) {
Expand Down Expand Up @@ -106,7 +105,9 @@ class _default {
}
exports.default = _default;
function _onInputFocus() {
if (!this._options.alwaysFilter === true) {
if (this._autocompleteType === "list") {
_filterSuggestions(this._inputEl.value, this._listboxWidget.items);
} else {
this.resetFilter();
}
}
Expand Down
7 changes: 4 additions & 3 deletions packages/ui/makeup-combobox/dist/mjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ const defaultOptions = {
autoSelect: true,
collapseTimeout: 150,
customElementMode: false,
autoScroll: true,
alwaysFilter: true
autoScroll: true
};
class index_default {
constructor(widgetEl, selectedOptions) {
Expand Down Expand Up @@ -104,7 +103,9 @@ class index_default {
}
}
function _onInputFocus() {
if (!this._options.alwaysFilter === true) {
if (this._autocompleteType === "list") {
_filterSuggestions(this._inputEl.value, this._listboxWidget.items);
} else {
this.resetFilter();
}
}
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/makeup-combobox/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const defaultOptions = {
collapseTimeout: 150,
customElementMode: false,
autoScroll: true,
alwaysFilter: true,
};

export default class {
Expand Down Expand Up @@ -123,7 +122,9 @@ export default class {
}

function _onInputFocus() {
if (!this._options.alwaysFilter === true) {
if (this._autocompleteType === "list") {
_filterSuggestions(this._inputEl.value, this._listboxWidget.items);
} else {
this.resetFilter();
}
}
Expand Down

0 comments on commit c84b6d4

Please sign in to comment.