diff --git a/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.ts b/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.ts index fb79a9c9ec..0e898ee4b4 100644 --- a/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.ts +++ b/frontend/projects/upgrade/src/app/features/dashboard/feature-flags/pages/feature-flag-root-page/feature-flag-root-page-content/feature-flag-root-section-card/feature-flag-root-section-card-table/feature-flag-root-section-card-table.component.ts @@ -47,7 +47,17 @@ export class FeatureFlagRootSectionCardTableComponent implements OnInit { constructor(private featureFlagsService: FeatureFlagsService) {} ngOnInit() { + this.sortTable(); + } + + ngOnChanges() { + this.sortTable(); + } + + private sortTable() { if (this.dataSource$?.data) { + this.dataSource$.sortingDataAccessor = (item, property) => + property === 'name' ? item.name.toLowerCase() : item[property]; this.dataSource$.sort = this.sort; } }