Skip to content

Commit eceba42

Browse files
committed
fix: isEqual
1 parent ba93521 commit eceba42

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22

33
import type {Column} from '@gravity-ui/react-data-table';
44
import {TableColumnSetup} from '@gravity-ui/uikit';
5+
import {isEqual} from 'lodash';
56

67
import {DrawerWrapper} from '../../../../components/Drawer';
78
import {DrawerControlType} from '../../../../components/Drawer/Drawer';
@@ -151,7 +152,7 @@ export const RunningQueriesData = ({
151152
loading={isFetching && currentData === undefined}
152153
settings={TOP_QUERIES_TABLE_SETTINGS}
153154
onRowClick={onRowClick}
154-
rowClassName={(row) => b('row', {active: row === selectedRow})}
155+
rowClassName={(row) => b('row', {active: isEqual(row, selectedRow)})}
155156
sortOrder={tableSort}
156157
onSort={handleTableSort}
157158
/>

src/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22

33
import type {Column} from '@gravity-ui/react-data-table';
44
import {Select, TableColumnSetup} from '@gravity-ui/uikit';
5+
import {isEqual} from 'lodash';
56

67
import type {DateRangeValues} from '../../../../components/DateRange';
78
import {DateRange} from '../../../../components/DateRange';
@@ -188,7 +189,7 @@ export const TopQueriesData = ({
188189
loading={isFetching && currentData === undefined}
189190
settings={TOP_QUERIES_TABLE_SETTINGS}
190191
onRowClick={onRowClick}
191-
rowClassName={(row) => b('row', {active: row === selectedRow})}
192+
rowClassName={(row) => b('row', {active: isEqual(row, selectedRow)})}
192193
sortOrder={tableSort}
193194
onSort={handleTableSort}
194195
/>

0 commit comments

Comments
 (0)