Skip to content

Commit e0f74f4

Browse files
committed
feat(TableColumnSetup): support sortable columns
1 parent b4e749a commit e0f74f4

File tree

13 files changed

+62
-41
lines changed

13 files changed

+62
-41
lines changed

src/components/PaginatedTable/TableChunk.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export const TableChunk = typedMemo(function TableChunk<T, F>({
6666
const [autoRefreshInterval] = useAutoRefreshInterval();
6767
const {noBatching} = usePaginatedTableState();
6868

69-
const columnsIds = columns.map((column) => column.name);
69+
//sort ids to prevent refetch if only order was changed
70+
const columnsIds = columns.map((column) => column.name).toSorted();
7071

7172
const queryParams = {
7273
offset: id * chunkSize,

src/containers/Clusters/Clusters.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ export function Clusters() {
211211
items={columnsToSelect}
212212
showStatus
213213
onUpdate={setColumns}
214-
sortable={false}
215214
/>
216215
</Flex>
217216
{clusters?.length ? (

src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ export function GroupedNodesComponent({
213213
items={columnsToSelect}
214214
showStatus
215215
onUpdate={setColumns}
216-
sortable={false}
217216
/>
218217
}
219218
error={error ? <ResponseError error={error} /> : null}

src/containers/Nodes/PaginatedNodes/NodesComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export function NodesComponent({
7070
items={columnsToSelect}
7171
showStatus
7272
onUpdate={setColumns}
73-
sortable={false}
7473
/>
7574
}
7675
table={

src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ export function GroupedStorageGroupsComponent({
183183
items={columnsToSelect}
184184
showStatus
185185
onUpdate={setColumns}
186-
sortable={false}
187186
/>
188187
}
189188
error={error ? <ResponseError error={error} /> : null}

src/containers/Storage/PaginatedStorageGroups/StorageGroupsComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export function StorageGroupsComponent({
4141
items={columnsToSelect}
4242
showStatus
4343
onUpdate={setColumns}
44-
sortable={false}
4544
/>
4645
}
4746
table={

src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ export function GroupedStorageNodesComponent({
184184
items={columnsToSelect}
185185
showStatus
186186
onUpdate={setColumns}
187-
sortable={false}
188187
/>
189188
}
190189
error={error ? <ResponseError error={error} /> : null}

src/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export function StorageNodesComponent({
4545
items={columnsToSelect}
4646
showStatus
4747
onUpdate={setColumns}
48-
sortable={false}
4948
/>
5049
}
5150
table={

src/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ export function PartitionsTableColumnSetup({
186186
items={columnsToSelect}
187187
showStatus
188188
onUpdate={handleTableColumnsSetupChange}
189-
sortable={false}
190189
/>
191190
);
192191
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export const RunningQueriesData = ({
7878
items={columnsToSelect}
7979
showStatus
8080
onUpdate={setColumns}
81-
sortable={false}
8281
/>
8382
);
8483
};

0 commit comments

Comments
 (0)