vue3-extended-multiselect 2.3.1 → 2.3.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # vue3-extended-multiselect v2.3.1
1
+ # vue3-extended-multiselect v2.3.3
2
2
 
3
3
  ***
4
4
 
@@ -1052,7 +1052,7 @@ const showLoaderIcon = vue.computed(() => {
1052
1052
  * @function
1053
1053
  * @param {Array} - array of selected options
1054
1054
  */
1055
- vue.watch(selectedOptions, (value) => {
1055
+ vue.watch(selectedOptions, (value) => {
1056
1056
  if (!value.length || value.length <= multipleBlocksLimit.value) {
1057
1057
  optionsLimitIncreaser.value = multipleBlocksLimit.value;
1058
1058
  }
@@ -1485,6 +1485,18 @@ const appropriatePlaceholder = vue.computed(() => {
1485
1485
  return createOnTheGo.value ? createOptionPlaceholder.value : placeholder.value;
1486
1486
  });
1487
1487
 
1488
+ /**
1489
+ * Determines whether to show placeholder block
1490
+ * if search field is hidden
1491
+ * @function
1492
+ * @returns {boolean} display
1493
+ */
1494
+ const hintBlockShown = vue.computed(() => {
1495
+ if (selectedOptions.value.length) return false;
1496
+
1497
+ return true;
1498
+ });
1499
+
1488
1500
  /**
1489
1501
  * Sets "margin-top" css property to multiple option blocks
1490
1502
  * if search field is shown
@@ -1501,7 +1513,7 @@ const multipleBlocksMargin = vue.computed(() => {
1501
1513
  * @returns {boolean} display
1502
1514
  */
1503
1515
  const placeholderBlockShown = vue.computed(() => {
1504
- if (selectedOptions.value.length) return false;
1516
+ if (selectedOptions.value.length || searchFieldForwarding.value) return false;
1505
1517
 
1506
1518
  return true;
1507
1519
  });
@@ -1885,7 +1897,7 @@ return (_ctx, _cache) => {
1885
1897
  }, null, 544 /* NEED_HYDRATION, NEED_PATCH */)
1886
1898
  ]))
1887
1899
  : (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$3, [
1888
- (placeholderBlockShown.value)
1900
+ (hintBlockShown.value)
1889
1901
  ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$3, vue.toDisplayString(appropriatePlaceholder.value), 1 /* TEXT */))
1890
1902
  : vue.createCommentVNode("v-if", true),
1891
1903
  vue.renderSlot(_ctx.$slots, "labelBlock", { labelBlockValue: singleLabel.value }, () => [
@@ -2962,6 +2974,15 @@ const triggerOptionBeforeSelection = () => {
2962
2974
  }
2963
2975
  };
2964
2976
 
2977
+ /**
2978
+ * Forcibly rolls up dropdown options list by changing "dropdownActive" flag
2979
+ * @function
2980
+ * @emits extended:available-options
2981
+ */
2982
+ vue.watch(availableOptions, () => {
2983
+ emitter.value.emit("extended:available-options");
2984
+ });
2985
+
2965
2986
  /**
2966
2987
  * "onBeforeMount" hook of ExtendedMultiselectOptions component
2967
2988
  * @listens extended:select-enter
@@ -3633,7 +3654,7 @@ const _hoisted_3 = { class: "extended__multiselect-cancel_wrapper" };
3633
3654
 
3634
3655
  /**
3635
3656
  * @author Ridiger Daniil Dmitrievich, 2022
3636
- * @version 2.3.1
3657
+ * @version 2.3.2
3637
3658
  */
3638
3659
 
3639
3660
  var script = {
@@ -5098,6 +5119,12 @@ vue.onBeforeMount(() => {
5098
5119
 
5099
5120
  chosenToggleAppearanceSide.value = toggleAppearanceSide.value;
5100
5121
 
5122
+ emitter.value.on("extended:available-options", () => {
5123
+ vue.nextTick(() => {
5124
+ toggleAppearanceRestrictorActivate();
5125
+ });
5126
+ });
5127
+
5101
5128
  emitter.value.on("extended:rollup-options", () => {
5102
5129
  if (!dropdownActive.value) return;
5103
5130