vue3-extended-multiselect 1.8.2 → 1.8.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 +6 -2
- package/README.md +1 -1
- package/jest.config.js +1 -1
- package/package.json +1 -1
- package/src/components/ExtendedMultiselectInput.vue +21 -1
- package/src/styles/main.css +6 -1
- package/src/styles/variables.css +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Patch notes
|
|
2
2
|
|
|
3
|
-
Current `vue3-extended-multiselect` version: **1.8.
|
|
3
|
+
Current `vue3-extended-multiselect` version: **1.8.3**
|
|
4
4
|
|
|
5
5
|
***
|
|
6
6
|
|
|
@@ -311,4 +311,8 @@ Adding descriptive comments for some types in typings.
|
|
|
311
311
|
|
|
312
312
|
### 1.8.2 (2023-02-21)
|
|
313
313
|
|
|
314
|
-
* Fixing bug with non-updating modelValue by handling preselected options.
|
|
314
|
+
* Fixing bug with non-updating modelValue by handling preselected options.
|
|
315
|
+
|
|
316
|
+
### 1.8.3 (2023-02-23)
|
|
317
|
+
|
|
318
|
+
* fixing bug with placeholder disappearing on blur.
|
package/README.md
CHANGED
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
/>
|
|
22
22
|
<div
|
|
23
23
|
class="extended__multiselect-block"
|
|
24
|
-
v-show="!searchFieldForwarding && !multiple"
|
|
24
|
+
v-show="!searchFieldForwarding && !multiple && !placeholderBlockShown"
|
|
25
25
|
@click.stop="expand"
|
|
26
26
|
>
|
|
27
27
|
<slot
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
<span>{{ singleLabel }}</span>
|
|
32
32
|
</slot>
|
|
33
33
|
</div>
|
|
34
|
+
<span
|
|
35
|
+
v-if="placeholderBlockShown"
|
|
36
|
+
class="extended__multiselect-placeholder"
|
|
37
|
+
>
|
|
38
|
+
{{ appropriatePlaceholder }}
|
|
39
|
+
</span>
|
|
34
40
|
<extended-multiselect-multiple
|
|
35
41
|
v-show="multiple && !!selectedOptions.length"
|
|
36
42
|
:style="multipleBlocksMargin"
|
|
@@ -456,6 +462,7 @@ const {
|
|
|
456
462
|
placeholder,
|
|
457
463
|
searchFilterActive,
|
|
458
464
|
showSearchField,
|
|
465
|
+
selectedOptions,
|
|
459
466
|
toggleOptionsBySelect,
|
|
460
467
|
togglingSavesSearchValue,
|
|
461
468
|
} = toRefs(props);
|
|
@@ -481,6 +488,19 @@ const multipleBlocksMargin = computed(() => {
|
|
|
481
488
|
return searchFieldForwarding.value ? { marginTop: "4px" } : null;
|
|
482
489
|
});
|
|
483
490
|
|
|
491
|
+
/**
|
|
492
|
+
* Determines whether to show placeholder block
|
|
493
|
+
* @function
|
|
494
|
+
* @returns {boolean} display
|
|
495
|
+
*/
|
|
496
|
+
const placeholderBlockShown = computed(() => {
|
|
497
|
+
if (selectedOptions.value.length || searchFieldForwarding.value) {
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
return true;
|
|
502
|
+
});
|
|
503
|
+
|
|
484
504
|
/**
|
|
485
505
|
* Defines classes of search field
|
|
486
506
|
* @function
|
package/src/styles/main.css
CHANGED