@afeefa/vue-app 0.0.66 → 0.0.67

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 0.0.66
1
+ 0.0.67
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -70,10 +70,19 @@ export class FormFieldMixin extends Vue {
70
70
 
71
71
  if (field.hasOptions()) {
72
72
  const options = field.getOptions()
73
- return Object.keys(options).map(value => ({
74
- itemText: options[value],
75
- itemValue: value
76
- }))
73
+ return options.map((value, index) => {
74
+ if (typeof value === 'object') { // object option
75
+ return {
76
+ itemText: value.title,
77
+ itemValue: value.value
78
+ }
79
+ } else { // scalar option
80
+ return {
81
+ itemText: value,
82
+ itemValue: index
83
+ }
84
+ }
85
+ })
77
86
  }
78
87
  }
79
88