diff --git a/packages/react-storage/src/components/StorageBrowser/composables/DataTable/DataTable.tsx b/packages/react-storage/src/components/StorageBrowser/composables/DataTable/DataTable.tsx index d1d6f04324..ae5add0456 100644 --- a/packages/react-storage/src/components/StorageBrowser/composables/DataTable/DataTable.tsx +++ b/packages/react-storage/src/components/StorageBrowser/composables/DataTable/DataTable.tsx @@ -11,8 +11,6 @@ import { TextDataCell } from './dataCells/TextDataCell'; import { DataTableDataCell, DataTableHeader } from './types'; import { WithKey } from '../../components/types'; import { CheckboxHeader } from './headers/CheckboxHeader'; -import { STORAGE_BROWSER_BLOCK } from '../../constants'; -import { ViewElement } from '../../context/elements'; export interface DataTableRow { content: WithKey[]; @@ -21,14 +19,12 @@ export interface DataTableRow { export interface DataTableProps { headers: WithKey[]; isLoading?: boolean; - loadingIndicator?: React.ReactNode; rows: WithKey[]; } export const DataTable = ({ headers, isLoading, - loadingIndicator, rows, }: DataTableProps): React.JSX.Element => { const mappedHeaders = headers.map(({ key, content, type }) => { @@ -96,10 +92,5 @@ export const DataTable = ({ }), })); - return ( - - - {isLoading ? loadingIndicator : null} - - ); + return
; }; diff --git a/packages/react-storage/src/components/StorageBrowser/controls/hooks/useDataTable.ts b/packages/react-storage/src/components/StorageBrowser/controls/hooks/useDataTable.ts index bc847fbe0e..a960030a2b 100644 --- a/packages/react-storage/src/components/StorageBrowser/controls/hooks/useDataTable.ts +++ b/packages/react-storage/src/components/StorageBrowser/controls/hooks/useDataTable.ts @@ -35,8 +35,7 @@ const UNSORTABLE_GROUPS: DataTableDataCell['type'][] = ['checkbox']; export const useDataTable = (): DataTableProps => { const { data } = useControlsContext(); - const { tableData } = data; - const { isLoading, loadingIndicator } = data; + const { isLoading, tableData } = data; const defaultSortIndex = React.useMemo( () => tableData?.headers?.findIndex(({ type }) => type === 'sort') ?? -1, @@ -156,7 +155,6 @@ export const useDataTable = (): DataTableProps => { return { headers: mappedHeaders ?? [], isLoading, - loadingIndicator, rows: sortedRows ?? [], }; }; diff --git a/packages/react-storage/src/components/StorageBrowser/controls/types.ts b/packages/react-storage/src/components/StorageBrowser/controls/types.ts index 768e7058fc..1ebd86acb7 100644 --- a/packages/react-storage/src/components/StorageBrowser/controls/types.ts +++ b/packages/react-storage/src/components/StorageBrowser/controls/types.ts @@ -62,7 +62,6 @@ export interface ControlsContext { isFolderNameDisabled?: boolean; isOverwriteToggleDisabled?: boolean; isSearchingSubfolders?: boolean; - loadingIndicator?: React.ReactNode; loadingIndicatorLabel?: string; location?: LocationState; overwriteToggleLabel?: string;