From b8a990c31ee8abc65b8890f9c04296daeb0bb919 Mon Sep 17 00:00:00 2001 From: Lyubov Voloshko Date: Mon, 9 Jun 2025 23:12:36 +0300 Subject: [PATCH] fix: fix checking if row selected --- .../app/components/dashboard/db-table/db-table.component.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/src/app/components/dashboard/db-table/db-table.component.ts b/frontend/src/app/components/dashboard/db-table/db-table.component.ts index c7bcbb41f..8e368b528 100644 --- a/frontend/src/app/components/dashboard/db-table/db-table.component.ts +++ b/frontend/src/app/components/dashboard/db-table/db-table.component.ts @@ -406,8 +406,6 @@ export class DbTableComponent implements OnInit { event.stopPropagation(); this.selectedRowType = 'foreignKey'; - console.log('handleForeignKeyView', foreignKeys, row); - this._tableState.selectRow({ tableName: null, record: null, @@ -422,7 +420,6 @@ export class DbTableComponent implements OnInit { this._tableRow.fetchTableRow(this.connectionID, foreignKeys.referenced_table_name, {[foreignKeys.referenced_column_name]: row[foreignKeys.referenced_column_name]}) .subscribe(res => { - console.log('Fetched foreign key row:', res); this._tableState.selectRow({ tableName: foreignKeys.referenced_table_name, record: res.row, @@ -460,12 +457,11 @@ export class DbTableComponent implements OnInit { } isRowSelected(primaryKeys) { - if (this.selectedRowType === 'record' && this.selectedRow.primaryKeys !== null) return this.selectedRow && Object.keys(this.selectedRow.primaryKeys).length && JSON.stringify(this.selectedRow.primaryKeys) === JSON.stringify(primaryKeys); + if (this.selectedRowType === 'record' && this.selectedRow && this.selectedRow.primaryKeys !== null) return this.selectedRow && Object.keys(this.selectedRow.primaryKeys).length && JSON.stringify(this.selectedRow.primaryKeys) === JSON.stringify(primaryKeys); return false; } isForeignKeySelected(record, foreignKey: TableForeignKey) { - if (this.selectedRow) console.log('isForeignKeySelected', this.selectedRow.primaryKeys, foreignKey); const primaryKeyValue = record[foreignKey.referenced_column_name]; if (this.selectedRowType === 'foreignKey' && this.selectedRow && this.selectedRow.record !== null) {