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 (
|
return (
|
||||||
<>
|
<>
|
||||||
{!rows && <Loading />}
|
|
||||||
{rows && (rows.length > 0 || !emptyState) && isPaginated && (
|
{rows && (rows.length > 0 || !emptyState) && isPaginated && (
|
||||||
<PaginatingTableToolbar
|
<PaginatingTableToolbar
|
||||||
count={rows.length}
|
count={rows.length}
|
||||||
|
@ -263,15 +262,17 @@ export function KeycloakDataTable<T>({
|
||||||
searchTypeComponent={searchTypeComponent}
|
searchTypeComponent={searchTypeComponent}
|
||||||
toolbarItem={toolbarItem}
|
toolbarItem={toolbarItem}
|
||||||
>
|
>
|
||||||
<DataTable
|
{!loading && (
|
||||||
canSelectAll={canSelectAll}
|
<DataTable
|
||||||
onSelect={onSelect ? _onSelect : undefined}
|
canSelectAll={canSelectAll}
|
||||||
actions={convertAction()}
|
onSelect={onSelect ? _onSelect : undefined}
|
||||||
actionResolver={actionResolver}
|
actions={convertAction()}
|
||||||
rows={rows}
|
actionResolver={actionResolver}
|
||||||
columns={columns}
|
rows={rows}
|
||||||
ariaLabelKey={ariaLabelKey}
|
columns={columns}
|
||||||
/>
|
ariaLabelKey={ariaLabelKey}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{loading && <Loading />}
|
{loading && <Loading />}
|
||||||
</PaginatingTableToolbar>
|
</PaginatingTableToolbar>
|
||||||
)}
|
)}
|
||||||
|
@ -286,15 +287,18 @@ export function KeycloakDataTable<T>({
|
||||||
toolbarItem={toolbarItem}
|
toolbarItem={toolbarItem}
|
||||||
searchTypeComponent={searchTypeComponent}
|
searchTypeComponent={searchTypeComponent}
|
||||||
>
|
>
|
||||||
<DataTable
|
{!loading && (
|
||||||
canSelectAll={canSelectAll}
|
<DataTable
|
||||||
onSelect={onSelect ? _onSelect : undefined}
|
canSelectAll={canSelectAll}
|
||||||
actions={convertAction()}
|
onSelect={onSelect ? _onSelect : undefined}
|
||||||
actionResolver={actionResolver}
|
actions={convertAction()}
|
||||||
rows={filteredData || rows}
|
actionResolver={actionResolver}
|
||||||
columns={columns}
|
rows={filteredData || rows}
|
||||||
ariaLabelKey={ariaLabelKey}
|
columns={columns}
|
||||||
/>
|
ariaLabelKey={ariaLabelKey}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{loading && <Loading />}
|
||||||
</TableToolbar>
|
</TableToolbar>
|
||||||
)}
|
)}
|
||||||
<>{!loading && rows?.length === 0 && emptyState}</>
|
<>{!loading && rows?.length === 0 && emptyState}</>
|
||||||
|
|
Loading…
Reference in a new issue