Browse Source

Merge pull request #13346 from ArtemDzhereleiko/AD/event-table/hideClearEventActionIput

Event table hide clear event button as input
pull/13363/head
Vladyslav Prykhodko 1 year ago
committed by GitHub
parent
commit
7e49730be6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      ui-ngx/src/app/modules/home/components/event/event-table-config.ts
  2. 8
      ui-ngx/src/app/modules/home/components/event/event-table.component.ts

4
ui-ngx/src/app/modules/home/components/event/event-table-config.ts

@ -59,7 +59,6 @@ import { AppState } from '@core/core.state';
export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
eventTypeValue: EventType | DebugEventType;
hideClearEventAction = false;
private filterParams: FilterEventBody = {};
private filterColumns: FilterEntityColumn[] = [];
@ -95,7 +94,8 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> {
private cd: ChangeDetectorRef,
private store: Store<AppState>,
public testButtonLabel?: string,
private debugEventSelected?: EventEmitter<EventBody>) {
private debugEventSelected?: EventEmitter<EventBody>,
public hideClearEventAction = false) {
super();
this.loadDataOnInit = false;
this.tableTitle = '';

8
ui-ngx/src/app/modules/home/components/event/event-table.component.ts

@ -58,6 +58,9 @@ export class EventTableComponent implements OnInit, AfterViewInit, OnDestroy {
@Input()
debugEventTypes: Array<DebugEventType>;
@Input()
hideClearEventAction: boolean = false;
activeValue = false;
dirtyValue = false;
entityIdValue: EntityId;
@ -147,12 +150,13 @@ export class EventTableComponent implements OnInit, AfterViewInit, OnDestroy {
this.cd,
this.store,
this.functionTestButtonLabel,
this.debugEventSelected
this.debugEventSelected,
this.hideClearEventAction
);
}
ngAfterViewInit() {
this.isEmptyData$ = this.entitiesTable.dataSource.isEmpty().subscribe(value => this.eventTableConfig.hideClearEventAction = value);
this.isEmptyData$ = this.entitiesTable.dataSource.isEmpty().subscribe(value => this.eventTableConfig.hideClearEventAction = value || this.hideClearEventAction);
}
ngOnDestroy() {

Loading…
Cancel
Save