@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.269
1
+ 0.0.271
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.269",
3
+ "version": "0.0.271",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -12,21 +12,23 @@
12
12
  @beforeOpen="calculateSelectorSize"
13
13
  >
14
14
  <template #activator="{open}">
15
- <a-text-field
16
- ref="input"
17
- :value="inputModel"
18
- :title="inputModel"
19
- readonly
20
- :label="label"
21
- :rules="validationRules"
22
- placeholder="Mausklick oder Space/↓-Taste zum Auswählen"
23
- :clearable="clearable && !!selectedItems.length"
24
- appendIcon="$dropdown"
25
- @keydown.space.prevent="open"
26
- @keydown.down.prevent="open"
27
- @keydown.enter.prevent="open"
28
- @clear="clear"
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
- const input = this.$refs.input.$el
113
- const inputWidth = input.offsetWidth
114
- this.$refs.select.setWidth(`calc(${inputWidth}px + 1rem)`)
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
- this.$refs.input.setFocus(true)
139
+ // input not available if custom activator is in use
140
+ this.$refs.input?.setFocus(true)
135
141
  }
136
142
 
137
143
  clear () {
@@ -63,7 +63,7 @@
63
63
  </div>
64
64
 
65
65
  <div
66
- style="width:100%;"
66
+ style="width:100%; white-space: normal;"
67
67
  v-on="on"
68
68
  >
69
69
  {{ getTitle(model) }}