@afeefa/vue-app 0.0.269 → 0.0.271
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.271
|
package/package.json
CHANGED
@@ -12,21 +12,23 @@
|
|
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
|
+
@keydown.space.prevent="open"
|
27
|
+
@keydown.down.prevent="open"
|
28
|
+
@keydown.enter.prevent="open"
|
29
|
+
@clear="clear"
|
30
|
+
/>
|
31
|
+
</slot>
|
30
32
|
</template>
|
31
33
|
|
32
34
|
<template #filters="{onSearchInputKey}">
|
@@ -62,7 +64,7 @@
|
|
62
64
|
</div>
|
63
65
|
|
64
66
|
<div
|
65
|
-
style="width:100%;"
|
67
|
+
style="width:100%; white-space: normal;"
|
66
68
|
v-on="on"
|
67
69
|
>
|
68
70
|
{{ getTitle(model) }}
|
@@ -109,9 +111,12 @@ export default class FormFieldSearchSelect extends Mixins(FormFieldMixin) {
|
|
109
111
|
}
|
110
112
|
|
111
113
|
calculateSelectorSize () {
|
112
|
-
|
113
|
-
const
|
114
|
-
|
114
|
+
// input not available if custom activator is in use
|
115
|
+
const input = this.$refs.input?.$el
|
116
|
+
if (input) {
|
117
|
+
const inputWidth = input.offsetWidth
|
118
|
+
this.$refs.select.setWidth(`calc(${inputWidth}px + 1rem)`)
|
119
|
+
}
|
115
120
|
}
|
116
121
|
|
117
122
|
get selectedItems () {
|
@@ -131,7 +136,8 @@ export default class FormFieldSearchSelect extends Mixins(FormFieldMixin) {
|
|
131
136
|
}
|
132
137
|
|
133
138
|
focusInput () {
|
134
|
-
|
139
|
+
// input not available if custom activator is in use
|
140
|
+
this.$refs.input?.setFocus(true)
|
135
141
|
}
|
136
142
|
|
137
143
|
clear () {
|