vue3-extended-multiselect 1.9.4 → 1.9.5

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.9.4**
3
+ Current `vue3-extended-multiselect` version: **1.9.5**
4
4
 
5
5
  ***
6
6
 
@@ -354,4 +354,8 @@ Adding descriptive comments for some types in typings.
354
354
  ### 1.9.4 (2023-03-23)
355
355
 
356
356
  * Fixing bug with hidden placeholder when "showSearchField" prop is set to false.
357
- * Fixing bug with deselection of all options when "showSelectedOptions" prop is set to true.
357
+ * Fixing bug with deselection of all options when "showSelectedOptions" prop is set to true.
358
+
359
+ ### 1.9.5 (2023-03-23)
360
+
361
+ * Adding "selected" flag to "marker" slot.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # vue3-extended-multiselect v1.9.4
1
+ # vue3-extended-multiselect v1.9.5
2
2
 
3
3
  ***
4
4
 
@@ -100,7 +100,7 @@ Slot name | Slot appointment | Slot scope
100
100
  ----------|------------------|-----------
101
101
  **option**|Option in options list with its label.|``option`` — option from options list,<br/>``createCustomOptionLabel`` — function that creates custom label for each option|
102
102
  **optionBlock**|Element with selected option and its label.|``label`` — option label,<br/>``deselectBlock`` — function that deselects option and removes element that contained it,<br/>``index`` — option index|
103
- **marker**|Marker that indicates state of option selection.|&mdash;|
103
+ **marker**|Marker that indicates state of option selection.|``selected`` — flag to determine markers for selected options|
104
104
  **maxElements**|Message displayed if maximal limit of elements with selected options has been shown.|&mdash;|
105
105
  **showMore**|Button that increases limit of displayed elements with selected options.|``showMoreOptions`` — function that increases limit of displayed elements with selected options|
106
106
  **noResults**|Message displayed if no options have been found by internal search.|&mdash;|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-extended-multiselect",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Extended multiselect component for applications based on Vue 3 framework",
5
5
  "keywords": [
6
6
  "multiselect",
@@ -55,7 +55,7 @@
55
55
  <div class="extended__multiselect-marker">
56
56
  <slot
57
57
  name="marker"
58
- :option="option"
58
+ :selected="showCurrentMarker(option)"
59
59
  >
60
60
  <div
61
61
  v-if="showMarker && showCurrentMarker(option)"
@@ -193,8 +193,15 @@
193
193
  >
194
194
  </slot>
195
195
  </template>
196
- <template #marker>
197
- <slot name="marker"></slot>
196
+ <template
197
+ v-if="slots.marker"
198
+ #marker="{ selected }"
199
+ >
200
+ <slot
201
+ name="marker"
202
+ :selected="selected"
203
+ >
204
+ </slot>
198
205
  </template>
199
206
  <template
200
207
  v-if="noResultsBlockShown"
@@ -262,7 +269,7 @@ import ExtendedMultiselectToggle from "./ExtendedMultiselectToggle.vue";
262
269
 
263
270
  /**
264
271
  * @author Ridiger Daniil Dmitrievich, 2022
265
- * @version 1.9.4
272
+ * @version 1.9.5
266
273
  */
267
274
  const props = defineProps({
268
275
  /**
@@ -1774,6 +1781,7 @@ onBeforeMount(() => {
1774
1781
  }
1775
1782
 
1776
1783
  selectedOptions.value.splice(payload.index, 1);
1784
+ updateModelValue();
1777
1785
 
1778
1786
  return;
1779
1787
  } else {