glib-web 4.13.0 → 4.13.1
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.
package/action.js
CHANGED
|
@@ -214,6 +214,7 @@ export default class Action {
|
|
|
214
214
|
}
|
|
215
215
|
if (spec.debug) {
|
|
216
216
|
console.debug("fieldValue:", fieldValue);
|
|
217
|
+
console.debug("fieldType:", typeof fieldValue);
|
|
217
218
|
}
|
|
218
219
|
return fieldValue;
|
|
219
220
|
}
|
|
@@ -231,6 +232,7 @@ export default class Action {
|
|
|
231
232
|
console.debug("formData:", spec.formData);
|
|
232
233
|
console.debug("fieldName:", fieldName);
|
|
233
234
|
console.debug("fieldValue:", fieldValue);
|
|
235
|
+
console.debug("fieldType:", typeof fieldValue);
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
if (Utils.type.isNotNull(fieldName)) {
|
package/actions/logics/set.js
CHANGED
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
return this.$parent.isDeleted(this.entryIndex);
|
|
49
49
|
},
|
|
50
50
|
removeEntry() {
|
|
51
|
-
return this.$parent.
|
|
51
|
+
return this.$parent.removeGroupEntry(this.entryIndex);
|
|
52
52
|
},
|
|
53
53
|
$registryEnabled() {
|
|
54
54
|
// Just so it works with `$closest()`. See `fieldName()`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="$styles()" :class="$classes()" v-if="loadIf">
|
|
3
|
-
<div v-for="(group, groupIndex) in groupSpecs" :key="`group${groupIndex}`">
|
|
3
|
+
<div v-for="(group, groupIndex) in groupSpecs" :key="`group${groupIndex}`" class="fields-dynamicGroup-entry">
|
|
4
4
|
<fields-internalDynamicGroupEntry :spec="entrySpec(group, groupIndex)" />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
@@ -138,10 +138,13 @@ export default {
|
|
|
138
138
|
|
|
139
139
|
// Note that `properties` might contain any properties such as fileTitle/fileUrl which
|
|
140
140
|
// are needed by file components.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
const value = this.localFieldModels[indexedName];
|
|
142
|
+
if (value) { // If no preexisting value, use the field's default value.
|
|
143
|
+
Object.assign(viewSpec, properties[name], {
|
|
144
|
+
name: name,
|
|
145
|
+
value: value
|
|
146
|
+
});
|
|
147
|
+
}
|
|
145
148
|
return viewSpec;
|
|
146
149
|
},
|
|
147
150
|
processViews(viewSpecs, properties, groupIndex) {
|
|
@@ -163,7 +166,7 @@ export default {
|
|
|
163
166
|
return viewSpec;
|
|
164
167
|
});
|
|
165
168
|
},
|
|
166
|
-
|
|
169
|
+
removeGroupEntry(index) {
|
|
167
170
|
Utils.launch.sheet.confirm(
|
|
168
171
|
{},
|
|
169
172
|
() => {
|
|
@@ -177,7 +180,7 @@ export default {
|
|
|
177
180
|
return this.groupValues[index]._destroy;
|
|
178
181
|
},
|
|
179
182
|
// Public methods accessible via components_invoke
|
|
180
|
-
|
|
183
|
+
addGroupEntry() {
|
|
181
184
|
this.groupValues.push([{}]);
|
|
182
185
|
}
|
|
183
186
|
}
|