vue3-extended-multiselect 1.6.1 → 1.6.3

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.1**
3
+ Current `vue3-extended-multiselect` version: **1.6.3**
4
4
 
5
5
  ***
6
6
 
@@ -245,4 +245,12 @@ Adding descriptive comments for some types in typings.
245
245
 
246
246
  ### 1.6.1 (2023-02-02)
247
247
 
248
- * Fixing bug with not clotting options list when single option was selected.
248
+ * Fixing bug with not clotting options list when single option was selected.
249
+
250
+ ### 1.6.2 (2023-02-02)
251
+
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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # vue3-extended-multiselect v1.6.1
1
+ # vue3-extended-multiselect v1.6.3
2
2
 
3
3
  ***
4
4
 
package/jest.config.js CHANGED
@@ -5,7 +5,7 @@ module.exports = {
5
5
  },
6
6
  expand: true,
7
7
  displayName: {
8
- name: "vue3-extended-multiselect 1.6.1",
8
+ name: "vue3-extended-multiselect 1.6.3",
9
9
  color: "bgGreen",
10
10
  },
11
11
  extraGlobals: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-extended-multiselect",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "Extended multiselect component for applications based on Vue 3 framework",
5
5
  "keywords": [
6
6
  "multiselect",
@@ -569,10 +569,6 @@ const multipleBlur = () => {
569
569
  searchFieldFocused.value = false;
570
570
  return;
571
571
  }
572
-
573
- if (blurSkipByBlock.value < 1) {
574
- searchFieldFocused.value = false;
575
- }
576
572
  };
577
573
 
578
574
  /**
@@ -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(
@@ -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.1
260
+ * @version 1.6.3
260
261
  */
261
262
 
262
263
  const props = defineProps({