vueless 1.4.3 → 1.4.4
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/package.json
CHANGED
|
@@ -138,6 +138,7 @@ const {
|
|
|
138
138
|
:placeholder="placeholder"
|
|
139
139
|
inputmode="search"
|
|
140
140
|
:left-icon="leftIcon"
|
|
141
|
+
:autocomplete="false"
|
|
141
142
|
v-bind="searchButtonLabel ? searchInputWithButtonAttrs : searchInputAttrs"
|
|
142
143
|
:data-test="getDataTest()"
|
|
143
144
|
@update:model-value="onUpdateValue"
|
|
@@ -120,7 +120,7 @@ const getOptionAriaSelected = (option: Option) => {
|
|
|
120
120
|
if (option && option.groupLabel) return undefined;
|
|
121
121
|
if (option.divider) return undefined;
|
|
122
122
|
|
|
123
|
-
return
|
|
123
|
+
return isSelectedOption(option);
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
const filteredOptions = computed(() => {
|
|
@@ -285,7 +285,7 @@ function select(option: Option, keyCode?: string) {
|
|
|
285
285
|
|
|
286
286
|
function isSelectedOption(option: Option) {
|
|
287
287
|
if (props.multiple) {
|
|
288
|
-
return (selectedValue.value as SelectedValue[]).find((selected) =>
|
|
288
|
+
return !!(selectedValue.value as SelectedValue[]).find((selected) =>
|
|
289
289
|
isEqual(selected, option[props.valueKey]),
|
|
290
290
|
);
|
|
291
291
|
}
|
|
@@ -515,9 +515,15 @@ const {
|
|
|
515
515
|
<!--
|
|
516
516
|
@slot Use it to add something after the option.
|
|
517
517
|
@binding {object} option
|
|
518
|
+
@binding {boolean} selected
|
|
518
519
|
@binding {number} index
|
|
519
520
|
-->
|
|
520
|
-
<slot
|
|
521
|
+
<slot
|
|
522
|
+
name="after-option"
|
|
523
|
+
:option="option"
|
|
524
|
+
:selected="isSelectedOption(option)"
|
|
525
|
+
:index="index"
|
|
526
|
+
>
|
|
521
527
|
<UIcon
|
|
522
528
|
v-if="isSelectedOption(option)"
|
|
523
529
|
color="inherit"
|
|
@@ -718,12 +718,7 @@ const {
|
|
|
718
718
|
:key="index"
|
|
719
719
|
v-bind="selectedLabelAttrs"
|
|
720
720
|
>
|
|
721
|
-
<UBadge
|
|
722
|
-
:title="option[labelKey]"
|
|
723
|
-
:size="size"
|
|
724
|
-
variant="subtle"
|
|
725
|
-
v-bind="badgeLabelAttrs"
|
|
726
|
-
>
|
|
721
|
+
<UBadge :title="option[labelKey]" :size="size" v-bind="badgeLabelAttrs">
|
|
727
722
|
<div v-bind="selectedLabelTextAttrs">
|
|
728
723
|
<!--
|
|
729
724
|
@slot Use it to customize selected option.
|
|
@@ -885,13 +880,14 @@ const {
|
|
|
885
880
|
<slot name="option" :option="option" :index="index" />
|
|
886
881
|
</template>
|
|
887
882
|
|
|
888
|
-
<template #after-option="{ option, index }">
|
|
883
|
+
<template #after-option="{ option, selected, index }">
|
|
889
884
|
<!--
|
|
890
885
|
@slot Use it to add something after option.
|
|
891
886
|
@binding {object} option
|
|
887
|
+
@binding {boolean} selected
|
|
892
888
|
@binding {number} index
|
|
893
889
|
-->
|
|
894
|
-
<slot name="after-option" :option="option" :index="index" />
|
|
890
|
+
<slot name="after-option" :option="option" :selected="selected" :index="index" />
|
|
895
891
|
</template>
|
|
896
892
|
|
|
897
893
|
<template #empty>
|
package/ui.form-select/config.ts
CHANGED
|
@@ -76,7 +76,12 @@ export default /*tw*/ {
|
|
|
76
76
|
],
|
|
77
77
|
},
|
|
78
78
|
counter: "",
|
|
79
|
-
badgeLabel:
|
|
79
|
+
badgeLabel: {
|
|
80
|
+
base: "{UBadge} py-0.5 px-1.5 gap-0.5 rounded-small max-w-full",
|
|
81
|
+
defaults: {
|
|
82
|
+
variant: "subtle",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
80
85
|
badgeClearIcon: {
|
|
81
86
|
base: "{>clearIcon} -mr-1",
|
|
82
87
|
defaults: {
|