diff --git a/projects/common/src/lib/entity/entity-table/entity-table.component.ts b/projects/common/src/lib/entity/entity-table/entity-table.component.ts index b0f772f38e..99a8aad024 100644 --- a/projects/common/src/lib/entity/entity-table/entity-table.component.ts +++ b/projects/common/src/lib/entity/entity-table/entity-table.component.ts @@ -162,7 +162,9 @@ export class EntityTableComponent implements OnInit, OnDestroy, OnChanges { */ onRowSelect(entity: object) { if (this.selection === false) { return; } - this.store.state.update(entity, {selected: true}, true); + + const many = this.template.selectMany ? this.template.selectMany : false; + this.store.state.update(entity, {selected: true}, !many); this.entitySelectChange.emit({selected: true, entity}); } diff --git a/projects/common/src/lib/entity/shared/entity.interfaces.ts b/projects/common/src/lib/entity/shared/entity.interfaces.ts index 76e503f828..ea81c4cf4e 100644 --- a/projects/common/src/lib/entity/shared/entity.interfaces.ts +++ b/projects/common/src/lib/entity/shared/entity.interfaces.ts @@ -59,6 +59,7 @@ export interface EntityOperationState { export interface EntityTableTemplate { columns: EntityTableColumn[]; selection?: boolean; + selectMany?: boolean; sort?: boolean; valueAccessor?: (entity: object, property: string) => any; rowClassFunc?: (entity: object) => {