From c8e2d7a84abda96c795d014ceac4f008af79b049 Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Wed, 11 Jun 2025 17:19:58 +0300 Subject: [PATCH] fix table search and minor mistypos --- .../dashboard/db-tables-list/db-tables-list.component.html | 4 ++-- .../dashboard/db-tables-list/db-tables-list.component.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html index 3affb374f..f4d5cbfaa 100644 --- a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html +++ b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.html @@ -12,8 +12,8 @@

{{connectionTitle}}

+ [(ngModel)]="substringToSearch" + (keyup)="searchSubstring()"> Nothing found. diff --git a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts index ef4d7ff39..d4ecf3939 100644 --- a/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts +++ b/frontend/src/app/components/dashboard/db-tables-list/db-tables-list.component.ts @@ -35,7 +35,7 @@ export class DbTablesListComponent { @Input() selectedTable: string; @Input() collapsed: boolean; - public searchString: string; + public substringToSearch: string; public foundTables: TableProperties[]; constructor( private _tableState: TableStateService, @@ -45,9 +45,9 @@ export class DbTablesListComponent { this.foundTables = this.tables; } - serach() { + searchSubstring() { this.foundTables = this.tables - .filter(tableItem => tableItem.table.toLowerCase().includes(this.searchString.toLowerCase()) || (tableItem.display_name && tableItem.display_name.toLowerCase().includes(this.searchString.toLowerCase()))); + .filter(tableItem => tableItem.table.toLowerCase().includes(this.substringToSearch?.toLowerCase()) || (tableItem.display_name && tableItem.display_name.toLowerCase().includes(this.substringToSearch.toLowerCase()))); } getTableName(table: TableProperties) {