vue3-extended-multiselect 1.9.2 → 1.9.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.9.2**
3
+ Current `vue3-extended-multiselect` version: **1.9.3**
4
4
 
5
5
  ***
6
6
 
@@ -345,4 +345,8 @@ Adding descriptive comments for some types in typings.
345
345
  ### 1.9.2 (2023-03-22)
346
346
 
347
347
  * Fixing bug with always fixed "height" css-property of option block.
348
- * Setting default value of "anyOptionWrapperBlockHeight" optional prop to "auto".
348
+ * Setting default value of "anyOptionWrapperBlockHeight" optional prop to "auto".
349
+
350
+ ### 1.9.3 (2023-03-22)
351
+
352
+ * Fixing a bug with v-model not clearing by computed property.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # vue3-extended-multiselect v1.9.2
1
+ # vue3-extended-multiselect v1.9.3
2
2
 
3
3
  ***
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-extended-multiselect",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "Extended multiselect component for applications based on Vue 3 framework",
5
5
  "keywords": [
6
6
  "multiselect",
@@ -226,6 +226,7 @@ import {
226
226
  onMounted,
227
227
  provide,
228
228
  ref,
229
+ toRaw,
229
230
  toRefs,
230
231
  useAttrs,
231
232
  useSlots,
@@ -261,9 +262,8 @@ import ExtendedMultiselectToggle from "./ExtendedMultiselectToggle.vue";
261
262
 
262
263
  /**
263
264
  * @author Ridiger Daniil Dmitrievich, 2022
264
- * @version 1.9.2
265
+ * @version 1.9.3
265
266
  */
266
-
267
267
  const props = defineProps({
268
268
  /**
269
269
  * Determines whether to select just now created option
@@ -913,7 +913,6 @@ const emit = defineEmits([
913
913
  ]);
914
914
 
915
915
  const dropdownActive = ref(false);
916
- const skipNextUpdate = ref(false);
917
916
  const externalOptionsLoader = ref(null);
918
917
  const chosenToggleAppearanceSide = ref(null);
919
918
  const selectedOptionsWatcher = ref(null);
@@ -1168,11 +1167,8 @@ watch(dropdownActive, (value) => {
1168
1167
  * Changes selected options based on external modelValue changes
1169
1168
  * @function
1170
1169
  */
1171
- watch(modelValue, () => {
1172
- if (skipNextUpdate.value) {
1173
- skipNextUpdate.value = false;
1174
- return;
1175
- }
1170
+ watch(modelValue, (value, prevValue) => {
1171
+ if (JSON.stringify(toRaw(value)) === JSON.stringify(toRaw(prevValue))) return;
1176
1172
 
1177
1173
  setPreselectedOptionsByModelValue(true);
1178
1174
  }, { deep: true });
@@ -1433,9 +1429,7 @@ const setPreselectedOptionsByModelValue = (withRemoval = false) => {
1433
1429
  if (withRemoval) {
1434
1430
  updateModelValue();
1435
1431
 
1436
- skipNextUpdate.value = true;
1437
-
1438
- selectedOptionsWatcher.value = watch(selectedOptions, (value) => {
1432
+ selectedOptionsWatcher.value = watch(selectedOptions, () => {
1439
1433
  updateModelValue();
1440
1434
 
1441
1435
  if (resetSearchByValue.value) {