@afeefa/vue-app 0.0.298 → 0.0.299

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.298
1
+ 0.0.299
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.298",
3
+ "version": "0.0.299",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -27,7 +27,13 @@
27
27
  import { Component, Mixins } from '@a-vue'
28
28
  import { ListFilterMixin } from '../ListFilterMixin'
29
29
 
30
- @Component
30
+ @Component({
31
+ props: [{
32
+ translateOption: {
33
+ default: () => title => title
34
+ }
35
+ }]
36
+ })
31
37
  export default class ListFilterSearch2 extends Mixins(ListFilterMixin) {
32
38
  name_ = 'q'
33
39
  maxWidth_ = 200
@@ -50,7 +56,7 @@ export default class ListFilterSearch2 extends Mixins(ListFilterMixin) {
50
56
  get qFieldOptions () {
51
57
  return this.filters.qfield.options.map(o => ({
52
58
  ...o,
53
- itemText: o.title,
59
+ itemText: this.translateOption(o.title),
54
60
  itemValue: o.value
55
61
  }))
56
62
  }
@@ -61,7 +67,8 @@ export default class ListFilterSearch2 extends Mixins(ListFilterMixin) {
61
67
  if (this.hasQFieldOptions() && !this.filters.qfield.hasDefaultValueSet()) {
62
68
  const selected = this.qFieldOptions.filter(o => o.value === this.filters.qfield.value)[0]
63
69
  if (selected) {
64
- return `${label} (${selected.title})`
70
+ const qFieldTitle = this.translateOption(selected.title)
71
+ return `${label} (${qFieldTitle})`
65
72
  }
66
73
  }
67
74
 
@@ -73,6 +80,10 @@ export default class ListFilterSearch2 extends Mixins(ListFilterMixin) {
73
80
 
74
81
  <style lang="scss" scoped>
75
82
  ::v-deep() {
83
+ .v-text-field .v-label {
84
+ max-width: unset;
85
+ }
86
+
76
87
  .v-radio {
77
88
  margin-right: 14px !important;
78
89
  margin-top: -4px;