@@ -5,11 +5,8 @@ import type {TableColumnSetupItem} from '@gravity-ui/uikit';
55import { ResponseError } from '../../components/Errors/ResponseError' ;
66import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper' ;
77import type { Column } from '../../components/PaginatedTable' ;
8- import {
9- PaginatedTableProvider ,
10- usePaginatedTableState ,
11- } from '../../components/PaginatedTable/PaginatedTableContext' ;
12- import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout' ;
8+ import { usePaginatedTableState } from '../../components/PaginatedTable/PaginatedTableContext' ;
9+ import { PaginatedTableWithLayout } from '../../components/PaginatedTable/PaginatedTableWithLayout' ;
1310import {
1411 NODES_COLUMNS_TITLES ,
1512 isMonitoringUserNodesColumn ,
@@ -179,34 +176,34 @@ function NodesComponent({
179176 ) ;
180177
181178 return (
182- < PaginatedTableProvider >
183- < TableWithControlsLayout fullHeight >
184- < TableWithControlsLayout . Controls >
185- < NodesControlsWithTableState
186- withGroupBySelect = { viewerNodesHandlerHasGrouping }
187- groupByParams = { groupByParams }
188- withPeerRoleFilter = { withPeerRoleFilter }
189- columnsToSelect = { columnsToSelect }
190- handleSelectedColumnsUpdate = { setColumns }
191- />
192- </ TableWithControlsLayout . Controls >
193- < TableWithControlsLayout . Table
179+ < PaginatedTableWithLayout
180+ controls = {
181+ < NodesControlsWithTableState
182+ withGroupBySelect = { viewerNodesHandlerHasGrouping }
183+ groupByParams = { groupByParams }
184+ withPeerRoleFilter = { withPeerRoleFilter }
185+ columnsToSelect = { columnsToSelect }
186+ handleSelectedColumnsUpdate = { setColumns }
187+ />
188+ }
189+ table = {
190+ < NodesTable
191+ path = { path }
192+ database = { database }
193+ searchValue = { searchValue }
194+ problemFilter = { problemFilter }
195+ uptimeFilter = { uptimeFilter }
196+ peerRoleFilter = { peerRoleFilter }
197+ columns = { columnsToShow }
194198 scrollContainerRef = { scrollContainerRef }
195- scrollDependencies = { [ searchValue , problemFilter , uptimeFilter , peerRoleFilter ] }
196- >
197- < NodesTable
198- path = { path }
199- database = { database }
200- searchValue = { searchValue }
201- problemFilter = { problemFilter }
202- uptimeFilter = { uptimeFilter }
203- peerRoleFilter = { peerRoleFilter }
204- columns = { columnsToShow }
205- scrollContainerRef = { scrollContainerRef }
206- />
207- </ TableWithControlsLayout . Table >
208- </ TableWithControlsLayout >
209- </ PaginatedTableProvider >
199+ />
200+ }
201+ tableProps = { {
202+ scrollContainerRef,
203+ scrollDependencies : [ searchValue , problemFilter , uptimeFilter , peerRoleFilter ] ,
204+ } }
205+ fullHeight
206+ />
210207 ) ;
211208}
212209
@@ -377,27 +374,26 @@ function GroupedNodesComponent({
377374 } ;
378375
379376 return (
380- < PaginatedTableProvider initialState = { initialState } >
381- < TableWithControlsLayout >
382- < TableWithControlsLayout . Controls >
383- < NodesControlsWithTableState
384- withGroupBySelect = { true }
385- groupByParams = { groupByParams }
386- withPeerRoleFilter = { withPeerRoleFilter }
387- columnsToSelect = { columnsToSelect }
388- handleSelectedColumnsUpdate = { setColumns }
389- />
390- </ TableWithControlsLayout . Controls >
391- { error ? < ResponseError error = { error } /> : null }
392- < TableWithControlsLayout . Table
393- scrollContainerRef = { scrollContainerRef }
394- scrollDependencies = { [ searchValue , groupByParam ] }
395- loading = { isLoading }
396- className = { b ( 'groups-wrapper' ) }
397- >
398- { renderGroups ( ) }
399- </ TableWithControlsLayout . Table >
400- </ TableWithControlsLayout >
401- </ PaginatedTableProvider >
377+ < PaginatedTableWithLayout
378+ initialState = { initialState }
379+ controls = {
380+ < NodesControlsWithTableState
381+ withGroupBySelect = { true }
382+ groupByParams = { groupByParams }
383+ withPeerRoleFilter = { withPeerRoleFilter }
384+ columnsToSelect = { columnsToSelect }
385+ handleSelectedColumnsUpdate = { setColumns }
386+ />
387+ }
388+ error = { error ? < ResponseError error = { error } /> : null }
389+ table = { renderGroups ( ) }
390+ tableProps = { {
391+ scrollContainerRef,
392+ scrollDependencies : [ searchValue , groupByParam ] ,
393+ loading : isLoading ,
394+ className : b ( 'groups-wrapper' ) ,
395+ } }
396+ fullHeight
397+ />
402398 ) ;
403399}
0 commit comments