@afeefa/vue-app 0.0.270 → 0.0.272
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.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.272
|
package/package.json
CHANGED
@@ -12,21 +12,24 @@
|
|
12
12
|
@beforeOpen="calculateSelectorSize"
|
13
13
|
>
|
14
14
|
<template #activator="{open}">
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
<slot name="activator">
|
16
|
+
<a-text-field
|
17
|
+
ref="input"
|
18
|
+
:value="inputModel"
|
19
|
+
:title="inputModel"
|
20
|
+
readonly
|
21
|
+
:label="label"
|
22
|
+
:rules="validationRules"
|
23
|
+
placeholder="Mausklick oder Space/↓-Taste zum Auswählen"
|
24
|
+
:clearable="clearable && !!selectedItems.length"
|
25
|
+
appendIcon="$dropdown"
|
26
|
+
hide-details="!!$attrs.hideDetails"
|
27
|
+
@keydown.space.prevent="open"
|
28
|
+
@keydown.down.prevent="open"
|
29
|
+
@keydown.enter.prevent="open"
|
30
|
+
@clear="clear"
|
31
|
+
/>
|
32
|
+
</slot>
|
30
33
|
</template>
|
31
34
|
|
32
35
|
<template #filters="{onSearchInputKey}">
|
@@ -109,9 +112,12 @@ export default class FormFieldSearchSelect extends Mixins(FormFieldMixin) {
|
|
109
112
|
}
|
110
113
|
|
111
114
|
calculateSelectorSize () {
|
112
|
-
|
113
|
-
const
|
114
|
-
|
115
|
+
// input not available if custom activator is in use
|
116
|
+
const input = this.$refs.input?.$el
|
117
|
+
if (input) {
|
118
|
+
const inputWidth = input.offsetWidth
|
119
|
+
this.$refs.select.setWidth(`calc(${inputWidth}px + 1rem)`)
|
120
|
+
}
|
115
121
|
}
|
116
122
|
|
117
123
|
get selectedItems () {
|
@@ -131,7 +137,8 @@ export default class FormFieldSearchSelect extends Mixins(FormFieldMixin) {
|
|
131
137
|
}
|
132
138
|
|
133
139
|
focusInput () {
|
134
|
-
|
140
|
+
// input not available if custom activator is in use
|
141
|
+
this.$refs.input?.setFocus(true)
|
135
142
|
}
|
136
143
|
|
137
144
|
clear () {
|