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.
|
@@ -1048,7 +1048,7 @@ const showLoaderIcon = computed(() => {
|
|
|
1048
1048
|
* @function
|
|
1049
1049
|
* @param {Array} - array of selected options
|
|
1050
1050
|
*/
|
|
1051
|
-
|
|
1051
|
+
watch(selectedOptions, (value) => {
|
|
1052
1052
|
if (!value.length || value.length <= multipleBlocksLimit.value) {
|
|
1053
1053
|
optionsLimitIncreaser.value = multipleBlocksLimit.value;
|
|
1054
1054
|
}
|
|
@@ -1481,6 +1481,18 @@ const appropriatePlaceholder = computed(() => {
|
|
|
1481
1481
|
return createOnTheGo.value ? createOptionPlaceholder.value : placeholder.value;
|
|
1482
1482
|
});
|
|
1483
1483
|
|
|
1484
|
+
/**
|
|
1485
|
+
* Determines whether to show placeholder block
|
|
1486
|
+
* if search field is hidden
|
|
1487
|
+
* @function
|
|
1488
|
+
* @returns {boolean} display
|
|
1489
|
+
*/
|
|
1490
|
+
const hintBlockShown = computed(() => {
|
|
1491
|
+
if (selectedOptions.value.length) return false;
|
|
1492
|
+
|
|
1493
|
+
return true;
|
|
1494
|
+
});
|
|
1495
|
+
|
|
1484
1496
|
/**
|
|
1485
1497
|
* Sets "margin-top" css property to multiple option blocks
|
|
1486
1498
|
* if search field is shown
|
|
@@ -1497,7 +1509,7 @@ const multipleBlocksMargin = computed(() => {
|
|
|
1497
1509
|
* @returns {boolean} display
|
|
1498
1510
|
*/
|
|
1499
1511
|
const placeholderBlockShown = computed(() => {
|
|
1500
|
-
if (selectedOptions.value.length) return false;
|
|
1512
|
+
if (selectedOptions.value.length || searchFieldForwarding.value) return false;
|
|
1501
1513
|
|
|
1502
1514
|
return true;
|
|
1503
1515
|
});
|
|
@@ -1881,7 +1893,7 @@ return (_ctx, _cache) => {
|
|
|
1881
1893
|
}, null, 544 /* NEED_HYDRATION, NEED_PATCH */)
|
|
1882
1894
|
]))
|
|
1883
1895
|
: (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
1884
|
-
(
|
|
1896
|
+
(hintBlockShown.value)
|
|
1885
1897
|
? (openBlock(), createElementBlock("span", _hoisted_6$3, toDisplayString(appropriatePlaceholder.value), 1 /* TEXT */))
|
|
1886
1898
|
: createCommentVNode("v-if", true),
|
|
1887
1899
|
renderSlot(_ctx.$slots, "labelBlock", { labelBlockValue: singleLabel.value }, () => [
|
|
@@ -2958,6 +2970,15 @@ const triggerOptionBeforeSelection = () => {
|
|
|
2958
2970
|
}
|
|
2959
2971
|
};
|
|
2960
2972
|
|
|
2973
|
+
/**
|
|
2974
|
+
* Forcibly rolls up dropdown options list by changing "dropdownActive" flag
|
|
2975
|
+
* @function
|
|
2976
|
+
* @emits extended:available-options
|
|
2977
|
+
*/
|
|
2978
|
+
watch(availableOptions, () => {
|
|
2979
|
+
emitter.value.emit("extended:available-options");
|
|
2980
|
+
});
|
|
2981
|
+
|
|
2961
2982
|
/**
|
|
2962
2983
|
* "onBeforeMount" hook of ExtendedMultiselectOptions component
|
|
2963
2984
|
* @listens extended:select-enter
|
|
@@ -3629,7 +3650,7 @@ const _hoisted_3 = { class: "extended__multiselect-cancel_wrapper" };
|
|
|
3629
3650
|
|
|
3630
3651
|
/**
|
|
3631
3652
|
* @author Ridiger Daniil Dmitrievich, 2022
|
|
3632
|
-
* @version 2.3.
|
|
3653
|
+
* @version 2.3.2
|
|
3633
3654
|
*/
|
|
3634
3655
|
|
|
3635
3656
|
var script = {
|
|
@@ -5094,6 +5115,12 @@ onBeforeMount(() => {
|
|
|
5094
5115
|
|
|
5095
5116
|
chosenToggleAppearanceSide.value = toggleAppearanceSide.value;
|
|
5096
5117
|
|
|
5118
|
+
emitter.value.on("extended:available-options", () => {
|
|
5119
|
+
nextTick(() => {
|
|
5120
|
+
toggleAppearanceRestrictorActivate();
|
|
5121
|
+
});
|
|
5122
|
+
});
|
|
5123
|
+
|
|
5097
5124
|
emitter.value.on("extended:rollup-options", () => {
|
|
5098
5125
|
if (!dropdownActive.value) return;
|
|
5099
5126
|
|