selectic 3.0.21 → 3.0.22

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.
@@ -314,6 +314,11 @@ class SelecticStore {
314
314
  }, { deep: true });
315
315
  vue.watch(() => this.state.internalValue, () => {
316
316
  this.buildSelectedOptions();
317
+ /* If there is only one item, and the previous selected value was
318
+ * different, then if we change it to the only available item we
319
+ * should disable Selectic (user has no more choice).
320
+ * This is why it is needed to check autoDisabled here. */
321
+ this.checkAutoDisabled();
317
322
  }, { deep: true });
318
323
  vue.watch(() => this.state.allOptions, () => {
319
324
  this.checkAutoSelect();
@@ -310,6 +310,11 @@ class SelecticStore {
310
310
  }, { deep: true });
311
311
  watch(() => this.state.internalValue, () => {
312
312
  this.buildSelectedOptions();
313
+ /* If there is only one item, and the previous selected value was
314
+ * different, then if we change it to the only available item we
315
+ * should disable Selectic (user has no more choice).
316
+ * This is why it is needed to check autoDisabled here. */
317
+ this.checkAutoDisabled();
313
318
  }, { deep: true });
314
319
  watch(() => this.state.allOptions, () => {
315
320
  this.checkAutoSelect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "selectic",
3
- "version": "3.0.21",
3
+ "version": "3.0.22",
4
4
  "description": "Smart Select for VueJS 3.x",
5
5
  "main": "dist/selectic.common.js",
6
6
  "module": "dist/selectic.esm.js",
@@ -38,7 +38,7 @@
38
38
  "test": "npm run build && tape test/**/*.spec.js"
39
39
  },
40
40
  "dependencies": {
41
- "vtyx": "4.0.5"
41
+ "vtyx": "4.1.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/types": "^7.21.2",
package/src/Store.tsx CHANGED
@@ -585,6 +585,11 @@ export default class SelecticStore {
585
585
 
586
586
  watch(() => this.state.internalValue, () => {
587
587
  this.buildSelectedOptions();
588
+ /* If there is only one item, and the previous selected value was
589
+ * different, then if we change it to the only available item we
590
+ * should disable Selectic (user has no more choice).
591
+ * This is why it is needed to check autoDisabled here. */
592
+ this.checkAutoDisabled();
588
593
  }, { deep: true });
589
594
 
590
595
  watch(() => this.state.allOptions, () => {