fix(ui): ограничить отрисовку большого каталога серверов
This commit is contained in:
1 parent
c3a9c00aed
commit
12c376b4c5
5 files changed
+29
-2
No files matched your search
@@ -378,7 +378,8 @@ function ServersDataGrid({
|
||||
features: dataGridFeatures,
|
||||
data: servers,
|
||||
columns,
|
||||
manualPagination: true,
|
||||
manualPagination: false,
|
||||
initialState: { pagination: { pageIndex: 0, pageSize: 50 } },
|
||||
getRowId: (row) => row.id,
|
||||
getRowCanExpand: () => true,
|
||||
})
|
||||
@@ -398,6 +399,7 @@ function ServersDataGrid({
|
||||
<DataGridShell
|
||||
table={table}
|
||||
recordCount={servers.length}
|
||||
pagination={servers.length > 50 || table.state.pagination.pageSize !== 50}
|
||||
onRowClick={(row) => table.getRow(row.id).toggleExpanded()}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user