diff --git a/front/app/src/common/crud/list/list.component.ts b/front/app/src/common/crud/list/list.component.ts index b77fbab9..5f6f45c8 100644 --- a/front/app/src/common/crud/list/list.component.ts +++ b/front/app/src/common/crud/list/list.component.ts @@ -56,19 +56,19 @@ export class ListComponent implements OnInit { } getColumnDefinition(schema: JSONSchema7) { - if (this.columns.length == 0) { - for (let param_name in schema.properties) { - if (param_name != "_id") { - this.displayedColumns.push(param_name); - } - } - } else { - for (let column of this.columns) { - if (this.jsonSchemasService.path_exists(schema, column)) { - this.displayedColumns.push(column); - } + for (let column of this.columns) { + if (this.jsonSchemasService.path_exists(schema, column)) { + this.displayedColumns.push(column); + } + } + + if (this.displayedColumns.length == 0) { + for (let param_name in schema.properties) { + if (param_name != "_id") { + this.displayedColumns.push(param_name); } } + } } getColumnValue(row: any, col: string) {