tin-spa 2.8.0 → 2.8.2
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/esm2020/lib/classes/Classes.mjs +1 -1
- package/esm2020/lib/components/form/form.component.mjs +9 -7
- package/esm2020/lib/services/dialog.service.mjs +2 -3
- package/fesm2015/tin-spa.mjs +9 -8
- package/fesm2015/tin-spa.mjs.map +1 -1
- package/fesm2020/tin-spa.mjs +9 -8
- package/fesm2020/tin-spa.mjs.map +1 -1
- package/lib/classes/Classes.d.ts +0 -1
- package/package.json +1 -1
package/fesm2020/tin-spa.mjs
CHANGED
|
@@ -2139,7 +2139,7 @@ class DialogService {
|
|
|
2139
2139
|
// heroField : config.heroField,
|
|
2140
2140
|
};
|
|
2141
2141
|
if (button.detailsConfig) {
|
|
2142
|
-
dialogConfig = button.name === 'create' ? button.detailsConfig : DetailsDialogProcessor.processDetailsConfig({ ...button.detailsConfig }, row);
|
|
2142
|
+
dialogConfig = button.name === 'create' ? { ...button.detailsConfig, tableConfigs: undefined, stepConfig: undefined } : DetailsDialogProcessor.processDetailsConfig({ ...button.detailsConfig }, row);
|
|
2143
2143
|
}
|
|
2144
2144
|
else {
|
|
2145
2145
|
dialogConfig = DetailsDialogProcessor.processDetailsConfig({ ...dialogConfig }, row);
|
|
@@ -2151,7 +2151,6 @@ class DialogService {
|
|
|
2151
2151
|
dialogConfig.formConfig.mode = button.name === 'create' ? 'create' : (button.name === 'edit' ? 'edit' : 'view');
|
|
2152
2152
|
}
|
|
2153
2153
|
if (button.name === 'create') {
|
|
2154
|
-
console.log('dialogConfig', dialogConfig);
|
|
2155
2154
|
dialogConfig.heroField = config.heroField;
|
|
2156
2155
|
dialogConfig.heroValue = config.heroValue;
|
|
2157
2156
|
}
|
|
@@ -4427,15 +4426,17 @@ class FormComponent {
|
|
|
4427
4426
|
inputChanged(field, value) {
|
|
4428
4427
|
this.inputChange.emit({ field: field, value: value });
|
|
4429
4428
|
this.updateChildOptions(field.name);
|
|
4430
|
-
if (this.config.mode == 'create' && field.child) {
|
|
4431
|
-
let child = this.fields.find(x => x.name == field.child.childField);
|
|
4432
|
-
this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[field.child.childValueField];
|
|
4433
|
-
}
|
|
4434
4429
|
if (this.config.mode == 'create' && field.children) {
|
|
4435
|
-
console.log("Children found");
|
|
4430
|
+
console.log("Children found for master field ", field);
|
|
4431
|
+
console.log("Master value is ", value);
|
|
4436
4432
|
field.children.forEach(childConfig => {
|
|
4437
4433
|
let child = this.fields.find(x => x.name == childConfig.childField);
|
|
4438
|
-
console.log("Child found");
|
|
4434
|
+
console.log("Child found ", child);
|
|
4435
|
+
console.log("Current data is ", this.data);
|
|
4436
|
+
console.log("Setting field ", child.name);
|
|
4437
|
+
console.log("Picked option is ", field.options.find(x => x[field.optionValue] == value));
|
|
4438
|
+
console.log("Set value is ", field.options.find(x => x[field.optionValue] == value)[childConfig.childValueField]);
|
|
4439
|
+
// this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[childConfig.childValueField]
|
|
4439
4440
|
this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[childConfig.childValueField];
|
|
4440
4441
|
});
|
|
4441
4442
|
}
|