From 8db475aace43c8f6f5561454485a7b39884511f3 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sat, 14 Mar 2026 16:14:59 +0700 Subject: [PATCH] feat(lib): implement view child signal --- libs/ui/src/lib/benchmark/benchmark.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ui/src/lib/benchmark/benchmark.component.ts b/libs/ui/src/lib/benchmark/benchmark.component.ts index ec213f3b0..98831a815 100644 --- a/libs/ui/src/lib/benchmark/benchmark.component.ts +++ b/libs/ui/src/lib/benchmark/benchmark.component.ts @@ -21,8 +21,8 @@ import { Input, OnChanges, Output, - ViewChild, - inject + inject, + viewChild } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { MatButtonModule } from '@angular/material/button'; @@ -72,7 +72,7 @@ export class GfBenchmarkComponent implements OnChanges { @Output() itemDeleted = new EventEmitter(); - @ViewChild(MatSort) protected sort: MatSort; + protected readonly sort = viewChild(MatSort); protected readonly dataSource = new MatTableDataSource([]); protected displayedColumns = [ @@ -117,7 +117,7 @@ export class GfBenchmarkComponent implements OnChanges { this.dataSource.data = this.benchmarks; this.dataSource.sortingDataAccessor = getLowercase; - this.dataSource.sort = this.sort; + this.dataSource.sort = this.sort(); this.isLoading = false; }