@formio/js 5.0.0-dev.5925.ef39512 → 5.0.0-dev.5933.606556f
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/dist/formio.form.js +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/datagrid/DataGrid.js +4 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +1 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -1
- package/lib/mjs/components/datagrid/DataGrid.js +4 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +1 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -1
- package/package.json +1 -1
|
@@ -413,6 +413,7 @@ class DataGridComponent extends NestedArrayComponent_1.default {
|
|
|
413
413
|
});
|
|
414
414
|
this.checkConditions();
|
|
415
415
|
this.triggerChange();
|
|
416
|
+
this.triggerChange({ modified: true });
|
|
416
417
|
this.redraw().then(() => {
|
|
417
418
|
this.focusOnNewRowElement(this.rows[index]);
|
|
418
419
|
});
|
|
@@ -492,6 +493,9 @@ class DataGridComponent extends NestedArrayComponent_1.default {
|
|
|
492
493
|
const options = lodash_1.default.clone(this.options);
|
|
493
494
|
options.name += `[${rowIndex}]`;
|
|
494
495
|
options.row = `${rowIndex}-${colIndex}`;
|
|
496
|
+
options.onChange = (flags, changed, modified) => {
|
|
497
|
+
this.triggerChange({ modified });
|
|
498
|
+
};
|
|
495
499
|
let columnComponent;
|
|
496
500
|
if (this.builderMode) {
|
|
497
501
|
col.id = col.id + rowIndex;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default class SelectBoxesComponent extends RadioComponent {
|
|
2
2
|
static savedValueTypes(schema: any): string[];
|
|
3
3
|
constructor(...args: any[]);
|
|
4
|
-
get emptyValue():
|
|
5
|
-
get defaultValue(): {};
|
|
4
|
+
get emptyValue(): any;
|
|
6
5
|
/**
|
|
7
6
|
* Only empty if the values are all false.
|
|
8
7
|
* @param {any} value - The value to check if empty.
|
|
@@ -65,7 +65,12 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
|
65
65
|
return info;
|
|
66
66
|
}
|
|
67
67
|
get emptyValue() {
|
|
68
|
-
return {
|
|
68
|
+
return this.component.values.reduce((prev, value) => {
|
|
69
|
+
if (value.value) {
|
|
70
|
+
prev[value.value] = false;
|
|
71
|
+
}
|
|
72
|
+
return prev;
|
|
73
|
+
}, {});
|
|
69
74
|
}
|
|
70
75
|
get defaultValue() {
|
|
71
76
|
let defaultValue = this.emptyValue;
|
|
@@ -262,6 +267,7 @@ class SelectBoxesComponent extends Radio_1.default {
|
|
|
262
267
|
else {
|
|
263
268
|
return super.setCustomValidity(messages, dirty, external);
|
|
264
269
|
}
|
|
270
|
+
;
|
|
265
271
|
}
|
|
266
272
|
validateValueAvailability(setting, value) {
|
|
267
273
|
if (!(0, utils_1.boolValue)(setting) || !value) {
|
|
@@ -410,6 +410,7 @@ export default class DataGridComponent extends NestedArrayComponent {
|
|
|
410
410
|
});
|
|
411
411
|
this.checkConditions();
|
|
412
412
|
this.triggerChange();
|
|
413
|
+
this.triggerChange({ modified: true });
|
|
413
414
|
this.redraw().then(() => {
|
|
414
415
|
this.focusOnNewRowElement(this.rows[index]);
|
|
415
416
|
});
|
|
@@ -488,6 +489,9 @@ export default class DataGridComponent extends NestedArrayComponent {
|
|
|
488
489
|
const options = _.clone(this.options);
|
|
489
490
|
options.name += `[${rowIndex}]`;
|
|
490
491
|
options.row = `${rowIndex}-${colIndex}`;
|
|
492
|
+
options.onChange = (flags, changed, modified) => {
|
|
493
|
+
this.triggerChange({ modified });
|
|
494
|
+
};
|
|
491
495
|
let columnComponent;
|
|
492
496
|
if (this.builderMode) {
|
|
493
497
|
col.id = col.id + rowIndex;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default class SelectBoxesComponent extends RadioComponent {
|
|
2
2
|
static savedValueTypes(schema: any): string[];
|
|
3
3
|
constructor(...args: any[]);
|
|
4
|
-
get emptyValue():
|
|
5
|
-
get defaultValue(): {};
|
|
4
|
+
get emptyValue(): any;
|
|
6
5
|
/**
|
|
7
6
|
* Only empty if the values are all false.
|
|
8
7
|
* @param {any} value - The value to check if empty.
|
|
@@ -67,7 +67,12 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
|
67
67
|
return info;
|
|
68
68
|
}
|
|
69
69
|
get emptyValue() {
|
|
70
|
-
return {
|
|
70
|
+
return this.component.values.reduce((prev, value) => {
|
|
71
|
+
if (value.value) {
|
|
72
|
+
prev[value.value] = false;
|
|
73
|
+
}
|
|
74
|
+
return prev;
|
|
75
|
+
}, {});
|
|
71
76
|
}
|
|
72
77
|
get defaultValue() {
|
|
73
78
|
let defaultValue = this.emptyValue;
|
|
@@ -263,6 +268,7 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
|
263
268
|
else {
|
|
264
269
|
return super.setCustomValidity(messages, dirty, external);
|
|
265
270
|
}
|
|
271
|
+
;
|
|
266
272
|
}
|
|
267
273
|
validateValueAvailability(setting, value) {
|
|
268
274
|
if (!boolValue(setting) || !value) {
|