slim-select 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/react/index.js +8 -7
- package/dist/react/index.umd.js +1 -1
- package/dist/render.d.ts +2 -0
- package/dist/slimselect.cjs.js +1 -1
- package/dist/slimselect.cjs.js.map +1 -1
- package/dist/slimselect.es.js +8 -7
- package/dist/slimselect.es.js.map +1 -1
- package/dist/slimselect.iife.js +1 -1
- package/dist/slimselect.iife.js.map +1 -1
- package/dist/slimselect.js +1 -1
- package/dist/slimselect.js.map +1 -1
- package/dist/vue/index.js +8 -7
- package/dist/vue/index.umd.js +1 -1
- package/package.json +7 -7
package/dist/slimselect.es.js
CHANGED
|
@@ -1038,7 +1038,7 @@ var O = class {
|
|
|
1038
1038
|
let e = this.store.getSelected();
|
|
1039
1039
|
e.push(t.id), this.callbacks.setSelected(e, !0);
|
|
1040
1040
|
} else this.callbacks.setSelected([t.id], !0);
|
|
1041
|
-
if (this.callbacks.
|
|
1041
|
+
if (this.callbacks.clearSearch(), this.settings.closeOnSelect) {
|
|
1042
1042
|
let e = i(this.content.main);
|
|
1043
1043
|
setTimeout(() => {
|
|
1044
1044
|
this.requestClose("select", { selectionChanged: !0 });
|
|
@@ -1959,6 +1959,7 @@ var R = class {
|
|
|
1959
1959
|
});
|
|
1960
1960
|
},
|
|
1961
1961
|
search: this.search.bind(this),
|
|
1962
|
+
clearSearch: this.clearSearch.bind(this),
|
|
1962
1963
|
beforeChange: this.events.beforeChange,
|
|
1963
1964
|
afterChange: this.events.afterChange
|
|
1964
1965
|
};
|
|
@@ -2069,24 +2070,24 @@ var R = class {
|
|
|
2069
2070
|
});
|
|
2070
2071
|
}
|
|
2071
2072
|
applyClose(e) {
|
|
2072
|
-
this.render.close(), !this.settings.keepSearch && this.render.content.search.input.value !== "" && (this.sync.flush(), this.
|
|
2073
|
+
this.render.close(), !this.settings.keepSearch && this.render.content.search.input.value !== "" && (this.sync.flush(), this.clearSearch());
|
|
2073
2074
|
let t = e.source === "outside" || e.source === "toggle";
|
|
2074
2075
|
this.render.mainFocus(t ? "click" : null), this.settings.isOpen = !1, this.settings.isFullOpen = !1, this.render.stopPositionTracking();
|
|
2075
2076
|
}
|
|
2076
2077
|
search(e) {
|
|
2077
2078
|
let t = e.trim();
|
|
2078
|
-
if (t === "") {
|
|
2079
|
-
this.
|
|
2079
|
+
if (t === "" ? this.render.content.search.input.value = "" : this.render.content.search.input.value !== e && (this.render.content.search.input.value = e), this.events.search) {
|
|
2080
|
+
this.runApiSearch(t);
|
|
2080
2081
|
return;
|
|
2081
2082
|
}
|
|
2082
|
-
if (
|
|
2083
|
-
this.
|
|
2083
|
+
if (t === "") {
|
|
2084
|
+
this.clearSearch();
|
|
2084
2085
|
return;
|
|
2085
2086
|
}
|
|
2086
2087
|
this.runLocalSearch(t);
|
|
2087
2088
|
}
|
|
2088
2089
|
clearSearch() {
|
|
2089
|
-
if (this.searchGeneration++, !this.events.search && this.render.canFilterOptionsInPlace()) {
|
|
2090
|
+
if (this.render.content.search.input.value = "", this.searchGeneration++, !this.events.search && this.render.canFilterOptionsInPlace()) {
|
|
2090
2091
|
this.render.filterOptionsInPlace("", this.events.searchFilter), this.render.resetSearchFilterState();
|
|
2091
2092
|
return;
|
|
2092
2093
|
}
|