vue3-extended-multiselect 1.6.2 → 1.6.4
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Patch notes
|
|
2
2
|
|
|
3
|
-
Current `vue3-extended-multiselect` version: **1.6.
|
|
3
|
+
Current `vue3-extended-multiselect` version: **1.6.4**
|
|
4
4
|
|
|
5
5
|
***
|
|
6
6
|
|
|
@@ -249,4 +249,12 @@ Adding descriptive comments for some types in typings.
|
|
|
249
249
|
|
|
250
250
|
### 1.6.2 (2023-02-02)
|
|
251
251
|
|
|
252
|
-
* Fixing bug with not clotting options list when multiple options were selected.
|
|
252
|
+
* Fixing bug with not clotting options list when multiple options were selected.
|
|
253
|
+
|
|
254
|
+
### 1.6.3 (2023-02-02)
|
|
255
|
+
|
|
256
|
+
* Fixing bug with duplicate options when using an external loader.
|
|
257
|
+
|
|
258
|
+
### 1.6.4 (2023-02-02)
|
|
259
|
+
|
|
260
|
+
* Fixing bug with duplication of selected and found options.
|
package/README.md
CHANGED
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -405,6 +405,17 @@ const props = defineProps({
|
|
|
405
405
|
required: true,
|
|
406
406
|
},
|
|
407
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Loader function provided by user.
|
|
410
|
+
* @property {Function} externalOptionsLoader
|
|
411
|
+
* @default null
|
|
412
|
+
* @param {string} value - value of search field
|
|
413
|
+
*/
|
|
414
|
+
externalOptionsLoader: {
|
|
415
|
+
type: Function,
|
|
416
|
+
default: null,
|
|
417
|
+
},
|
|
418
|
+
|
|
408
419
|
/**
|
|
409
420
|
* Option which should be selected by default
|
|
410
421
|
* if "multiple" prop equals false
|
|
@@ -462,6 +473,7 @@ const {
|
|
|
462
473
|
themeType,
|
|
463
474
|
toggleMaxHeight,
|
|
464
475
|
toggleMinHeight,
|
|
476
|
+
externalOptionsLoader,
|
|
465
477
|
} = toRefs(props);
|
|
466
478
|
|
|
467
479
|
const { createLabel, optionTypeRestrictor } = usePreselectedOptions(
|
|
@@ -854,7 +866,7 @@ const lookForObjectOptions = (option) => {
|
|
|
854
866
|
if (Array.isArray(option) && !!option.length) {
|
|
855
867
|
calculatedOptionLabel = option.join(", ");
|
|
856
868
|
} else {
|
|
857
|
-
const hasLabel = Object.getOwnPropertyNames(option).includes(
|
|
869
|
+
const hasLabel = Object.getOwnPropertyNames(option).includes(label.value);
|
|
858
870
|
|
|
859
871
|
if (hasLabel) {
|
|
860
872
|
calculatedOptionLabel = typeof option[label.value] === "object"
|
|
@@ -1009,7 +1021,7 @@ const selectOption = (option, clickEvent) => {
|
|
|
1009
1021
|
|| clickEvent.target.id === "extended__multiselect-cancel"
|
|
1010
1022
|
) return;
|
|
1011
1023
|
|
|
1012
|
-
if (selectedOptionsShown.value) {
|
|
1024
|
+
if (selectedOptionsShown.value || externalOptionsLoader.value) {
|
|
1013
1025
|
const optionDeselected = lookForObjectOptions(option);
|
|
1014
1026
|
|
|
1015
1027
|
if (!optionDeselected) {
|
|
@@ -162,6 +162,7 @@
|
|
|
162
162
|
:preselected-options="preselectedOptions"
|
|
163
163
|
:emitter="emitter"
|
|
164
164
|
:create-custom-option-label="createCustomOptionLabel"
|
|
165
|
+
:external-options-loader="externalOptionsLoader"
|
|
165
166
|
>
|
|
166
167
|
<template
|
|
167
168
|
v-if="slots.listHeader"
|
|
@@ -256,7 +257,7 @@ import ExtendedMultiselectToggle from "./ExtendedMultiselectToggle.vue";
|
|
|
256
257
|
|
|
257
258
|
/**
|
|
258
259
|
* @author Ridiger Daniil Dmitrievich, 2022
|
|
259
|
-
* @version 1.6.
|
|
260
|
+
* @version 1.6.4
|
|
260
261
|
*/
|
|
261
262
|
|
|
262
263
|
const props = defineProps({
|