ngx-rs-ant 0.9.6 → 0.9.9
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/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -895,12 +895,12 @@ class DataGridComponent {
|
|
|
895
895
|
this.reload();
|
|
896
896
|
}
|
|
897
897
|
reload() {
|
|
898
|
-
this.
|
|
898
|
+
this.columns.length = 0;
|
|
899
899
|
this.service.getMetadataByView(this.tenant, this.className, this.view || '').subscribe((response) => {
|
|
900
|
-
|
|
900
|
+
const columns = [];
|
|
901
901
|
for (let field of response.data.columns) {
|
|
902
902
|
if (field.type === 'FILE') {
|
|
903
|
-
|
|
903
|
+
columns.push({
|
|
904
904
|
dataField: field.name,
|
|
905
905
|
caption: field.caption,
|
|
906
906
|
dataType: 'string',
|
|
@@ -924,7 +924,7 @@ class DataGridComponent {
|
|
|
924
924
|
format: this.typeMap[field.dataType].format,
|
|
925
925
|
visible: field.visible
|
|
926
926
|
};
|
|
927
|
-
|
|
927
|
+
columns.push(column);
|
|
928
928
|
switch (field.dataType) {
|
|
929
929
|
case 'BOOLEAN':
|
|
930
930
|
column.allowHeaderFiltering = false;
|
|
@@ -1131,7 +1131,7 @@ class DataGridComponent {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
else if (field.type === 'RELATION') {
|
|
1134
|
-
|
|
1134
|
+
columns.push({
|
|
1135
1135
|
dataField: field.name,
|
|
1136
1136
|
caption: field.caption,
|
|
1137
1137
|
dataType: 'string',
|
|
@@ -1143,8 +1143,9 @@ class DataGridComponent {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
if (this.customColumnFn) {
|
|
1146
|
-
this.customColumnFn(
|
|
1146
|
+
this.customColumnFn(columns);
|
|
1147
1147
|
}
|
|
1148
|
+
this.columns = columns;
|
|
1148
1149
|
});
|
|
1149
1150
|
this.dataSource = new CustomStore({
|
|
1150
1151
|
key: 'oid',
|
|
@@ -1395,6 +1396,13 @@ class FormComponent {
|
|
|
1395
1396
|
submitForm($event) {
|
|
1396
1397
|
if (!$event.valid) {
|
|
1397
1398
|
this.submitCallback.emit({ success: false });
|
|
1399
|
+
for (let controlKey in this.formGroup.controls) {
|
|
1400
|
+
const control = this.formGroup.controls[controlKey];
|
|
1401
|
+
if (!control.valid && control.originElement) {
|
|
1402
|
+
control.originElement.scrollIntoView();
|
|
1403
|
+
break;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1398
1406
|
return;
|
|
1399
1407
|
}
|
|
1400
1408
|
this.service.createOrUpdate(this.tenant, this.className, {
|