put loading spinner inside table as proposed by PF (#418)
This commit is contained in:
parent
ad1fa1340f
commit
4ba5fcc723
1 changed files with 23 additions and 19 deletions
|
@ -242,7 +242,6 @@ export function KeycloakDataTable<T>({
|
|||
|
||||
return (
|
||||
<>
|
||||
{!rows && <Loading />}
|
||||
{rows && (rows.length > 0 || !emptyState) && isPaginated && (
|
||||
<PaginatingTableToolbar
|
||||
count={rows.length}
|
||||
|
@ -263,6 +262,7 @@ export function KeycloakDataTable<T>({
|
|||
searchTypeComponent={searchTypeComponent}
|
||||
toolbarItem={toolbarItem}
|
||||
>
|
||||
{!loading && (
|
||||
<DataTable
|
||||
canSelectAll={canSelectAll}
|
||||
onSelect={onSelect ? _onSelect : undefined}
|
||||
|
@ -272,6 +272,7 @@ export function KeycloakDataTable<T>({
|
|||
columns={columns}
|
||||
ariaLabelKey={ariaLabelKey}
|
||||
/>
|
||||
)}
|
||||
{loading && <Loading />}
|
||||
</PaginatingTableToolbar>
|
||||
)}
|
||||
|
@ -286,6 +287,7 @@ export function KeycloakDataTable<T>({
|
|||
toolbarItem={toolbarItem}
|
||||
searchTypeComponent={searchTypeComponent}
|
||||
>
|
||||
{!loading && (
|
||||
<DataTable
|
||||
canSelectAll={canSelectAll}
|
||||
onSelect={onSelect ? _onSelect : undefined}
|
||||
|
@ -295,6 +297,8 @@ export function KeycloakDataTable<T>({
|
|||
columns={columns}
|
||||
ariaLabelKey={ariaLabelKey}
|
||||
/>
|
||||
)}
|
||||
{loading && <Loading />}
|
||||
</TableToolbar>
|
||||
)}
|
||||
<>{!loading && rows?.length === 0 && emptyState}</>
|
||||
|
|
Loading…
Reference in a new issue