@danielgindi/selectbox 2.0.35 → 2.0.37
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/lib.cjs.js +5 -5
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +5 -5
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +5 -5
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/DropList.js +0 -4
- package/lib/SelectBox.js +4 -0
- package/package.json +1 -1
- package/vue/DropList.vue +5 -5
- package/vue/SelectBox.vue +10 -10
package/lib/DropList.js
CHANGED
|
@@ -2775,10 +2775,6 @@ class DropList {
|
|
|
2775
2775
|
let next = p.virtualListHelper.getItemElementAt(matchIndex);
|
|
2776
2776
|
this._focus(evt, next || null, matchIndex, true);
|
|
2777
2777
|
|
|
2778
|
-
if (!this.isVisible()) {
|
|
2779
|
-
this.triggerItemSelection(next ? null : items[matchIndex], evt);
|
|
2780
|
-
}
|
|
2781
|
-
|
|
2782
2778
|
// Record the last filter used
|
|
2783
2779
|
p.previousFilter = keyword;
|
|
2784
2780
|
|
package/lib/SelectBox.js
CHANGED
package/package.json
CHANGED
package/vue/DropList.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
|
-
import DropList from '../lib/DropList';
|
|
6
|
+
import DropList, { DefaultOptions } from '../lib/DropList';
|
|
7
7
|
import DomEventsSink from '@danielgindi/dom-utils/lib/DomEventsSink';
|
|
8
8
|
import { createSlotBasedRenderFunc, createSlotBasedUnrenderFunc } from './utils/slots.js';
|
|
9
9
|
import { version } from 'vue';
|
|
@@ -60,11 +60,11 @@ export const PropTypes = {
|
|
|
60
60
|
},
|
|
61
61
|
noResultsText: {
|
|
62
62
|
type: String,
|
|
63
|
-
|
|
63
|
+
required: false,
|
|
64
64
|
},
|
|
65
65
|
filterThrottleWindow: {
|
|
66
66
|
type: Number,
|
|
67
|
-
|
|
67
|
+
required: false,
|
|
68
68
|
},
|
|
69
69
|
filterOnEmptyTerm: {
|
|
70
70
|
type: Boolean,
|
|
@@ -303,12 +303,12 @@ export default {
|
|
|
303
303
|
|
|
304
304
|
noResultsText(value) {
|
|
305
305
|
if (this.nonReactive.instance)
|
|
306
|
-
this.nonReactive.instance.setNoResultsText(value);
|
|
306
|
+
this.nonReactive.instance.setNoResultsText(value ?? DefaultOptions.noResultsText);
|
|
307
307
|
},
|
|
308
308
|
|
|
309
309
|
filterThrottleWindow(value) {
|
|
310
310
|
if (this.nonReactive.instance)
|
|
311
|
-
this.nonReactive.instance.setFilterThrottleWindow(value
|
|
311
|
+
this.nonReactive.instance.setFilterThrottleWindow(value ?? DefaultOptions.filterThrottleWindow ?? 0);
|
|
312
312
|
},
|
|
313
313
|
|
|
314
314
|
filterOnEmptyTerm(value) {
|
package/vue/SelectBox.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
6
|
import { version } from 'vue';
|
|
7
|
-
import SelectBox from '../lib/SelectBox';
|
|
7
|
+
import SelectBox, { DefaultOptions } from '../lib/SelectBox';
|
|
8
8
|
import { createSlotBasedRenderFunc, createSlotBasedUnrenderFunc } from './utils/slots';
|
|
9
9
|
import deepEqual from 'fast-deep-equal';
|
|
10
10
|
|
|
@@ -111,11 +111,11 @@ export const PropTypes = {
|
|
|
111
111
|
},
|
|
112
112
|
noResultsText: {
|
|
113
113
|
type: String,
|
|
114
|
-
|
|
114
|
+
required: false,
|
|
115
115
|
},
|
|
116
116
|
filterThrottleWindow: {
|
|
117
117
|
type: Number,
|
|
118
|
-
|
|
118
|
+
required: false,
|
|
119
119
|
},
|
|
120
120
|
filterOnEmptyTerm: {
|
|
121
121
|
type: Boolean,
|
|
@@ -246,7 +246,7 @@ export const PropTypes = {
|
|
|
246
246
|
},
|
|
247
247
|
closeListWhenLoading: {
|
|
248
248
|
type: Boolean,
|
|
249
|
-
|
|
249
|
+
required: false,
|
|
250
250
|
},
|
|
251
251
|
clearInputWhen: {
|
|
252
252
|
type: Array,
|
|
@@ -570,12 +570,12 @@ export default {
|
|
|
570
570
|
|
|
571
571
|
noResultsText(value) {
|
|
572
572
|
if (this.nonReactive.instance)
|
|
573
|
-
this.nonReactive.instance.setNoResultsText(value);
|
|
573
|
+
this.nonReactive.instance.setNoResultsText(value ?? DefaultOptions.noResultsText);
|
|
574
574
|
},
|
|
575
575
|
|
|
576
576
|
filterThrottleWindow(value) {
|
|
577
577
|
if (this.nonReactive.instance)
|
|
578
|
-
this.nonReactive.instance.setFilterThrottleWindow(value
|
|
578
|
+
this.nonReactive.instance.setFilterThrottleWindow(value ?? DefaultOptions.filterThrottleWindow ?? 0);
|
|
579
579
|
},
|
|
580
580
|
|
|
581
581
|
filterOnEmptyTerm(value) {
|
|
@@ -710,7 +710,7 @@ export default {
|
|
|
710
710
|
|
|
711
711
|
closeListWhenLoading() {
|
|
712
712
|
if (this.nonReactive.instance)
|
|
713
|
-
this.nonReactive.instance.setCloseListWhenLoading(
|
|
713
|
+
this.nonReactive.instance.setCloseListWhenLoading(this.closeListWhenLoading ?? DefaultOptions.closeListWhenLoading);
|
|
714
714
|
},
|
|
715
715
|
|
|
716
716
|
clearInputWhen() {
|
|
@@ -827,8 +827,8 @@ export default {
|
|
|
827
827
|
blurOnSingleSelection: this.blurOnSingleSelection,
|
|
828
828
|
multi: this.multi,
|
|
829
829
|
searchable: this.searchable,
|
|
830
|
-
noResultsText: this.noResultsText,
|
|
831
|
-
filterThrottleWindow: this.filterThrottleWindow,
|
|
830
|
+
noResultsText: this.noResultsText ?? DefaultOptions.noResultsText,
|
|
831
|
+
filterThrottleWindow: this.filterThrottleWindow ?? DefaultOptions.filterThrottleWindow ?? 0,
|
|
832
832
|
filterOnEmptyTerm: this.filterOnEmptyTerm,
|
|
833
833
|
labelProp: this.labelProp,
|
|
834
834
|
valueProp: this.valueProp,
|
|
@@ -848,7 +848,7 @@ export default {
|
|
|
848
848
|
on: this._handleBoxEvents.bind(this),
|
|
849
849
|
additionalClasses: this.additionalClassesList,
|
|
850
850
|
isLoadingMode: this.isLoadingMode,
|
|
851
|
-
closeListWhenLoading: this.closeListWhenLoading,
|
|
851
|
+
closeListWhenLoading: this.closeListWhenLoading ?? DefaultOptions.closeListWhenLoading,
|
|
852
852
|
clearInputWhen: this.clearInputWhen,
|
|
853
853
|
treatGroupSelectionAsItems: this.treatGroupSelectionAsItems,
|
|
854
854
|
});
|