From 5bf7a8ea319f278b530a5b264206384bfa219e6c Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 27 Jun 2025 14:15:07 +1000 Subject: [PATCH] Data table tweaks (#9886) - Remove skeleton which hid table - Updated hooks --- src/frontend/src/tables/InvenTreeTable.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/frontend/src/tables/InvenTreeTable.tsx b/src/frontend/src/tables/InvenTreeTable.tsx index e8612f8309..4413226027 100644 --- a/src/frontend/src/tables/InvenTreeTable.tsx +++ b/src/frontend/src/tables/InvenTreeTable.tsx @@ -1,5 +1,10 @@ import { t } from '@lingui/core/macro'; -import { Box, type MantineStyleProp, Skeleton, Stack } from '@mantine/core'; +import { + Box, + LoadingOverlay, + type MantineStyleProp, + Stack +} from '@mantine/core'; import { useQuery } from '@tanstack/react-query'; import { type ContextMenuItemOptions, @@ -412,7 +417,7 @@ export function InvenTreeTable>({ newOrder.push(ACTIONS_COLUMN_ACCESSOR); tableColumns.setColumnsOrder(newOrder); } - }, [tableColumns.columnsOrder]); + }, [tableColumns.columnsOrder, tableColumns.setColumnsOrder]); // Reset the pagination state when the search term changes useEffect(() => { @@ -670,7 +675,7 @@ export function InvenTreeTable>({ columnIndex: number; }) => { // Ignore any click on the 'actions' column - if (column.accessor == '--actions--') { + if (column.accessor == ACTIONS_COLUMN_ACCESSOR) { return; } @@ -815,10 +820,6 @@ export function InvenTreeTable>({ ); }, [tableProps.onCellClick, tableProps.onRowClick, tableProps.modelType]); - if (!tableState.storedDataLoaded) { - return ; - } - return ( <> @@ -837,6 +838,7 @@ export function InvenTreeTable>({ )} +