Browse Source

Feature/extend activities table component by showAccountColumn input (#5556)

* Extend activities table component by showAccountColumn input

* Update changelog
pull/5557/head^2
Raj Gupta 17 hours ago
committed by GitHub
parent
commit
aa005e237c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 7
      libs/ui/src/lib/activities-table/activities-table.component.ts

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Added
- Added an option to configure the account column of the activities table component
### Changed ### Changed
- Renamed the show access token dialog component to user account registration dialog component - Renamed the show access token dialog component to user account registration dialog component

7
libs/ui/src/lib/activities-table/activities-table.component.ts

@ -104,6 +104,7 @@ export class GfActivitiesTableComponent
@Input() locale = getLocale(); @Input() locale = getLocale();
@Input() pageIndex: number; @Input() pageIndex: number;
@Input() pageSize = DEFAULT_PAGE_SIZE; @Input() pageSize = DEFAULT_PAGE_SIZE;
@Input() showAccountColumn = true;
@Input() showActions = true; @Input() showActions = true;
@Input() showCheckbox = false; @Input() showCheckbox = false;
@Input() showNameColumn = true; @Input() showNameColumn = true;
@ -192,6 +193,12 @@ export class GfActivitiesTableComponent
'actions' 'actions'
]; ];
if (!this.showAccountColumn) {
this.displayedColumns = this.displayedColumns.filter((column) => {
return column !== 'account';
});
}
if (!this.showCheckbox) { if (!this.showCheckbox) {
this.displayedColumns = this.displayedColumns.filter((column) => { this.displayedColumns = this.displayedColumns.filter((column) => {
return column !== 'importStatus' && column !== 'select'; return column !== 'importStatus' && column !== 'select';

Loading…
Cancel
Save