fixed logic when to show empty search result (#1053)

fixes: #1040
This commit is contained in:
Erik Jan de Wit 2021-08-24 12:38:29 +02:00 committed by GitHub
parent 89870cafc2
commit 4d789f84e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -110,7 +110,6 @@ export const ClientsSection = () => {
<DeleteConfirm /> <DeleteConfirm />
<KeycloakDataTable <KeycloakDataTable
key={key} key={key}
emptyState={<> </>}
loader={loader} loader={loader}
isPaginated isPaginated
ariaLabelKey="clients:clientList" ariaLabelKey="clients:clientList"

View file

@ -413,9 +413,9 @@ export function KeycloakDataTable<T>({
)} )}
{!loading && {!loading &&
(!data || data.length === 0) && (!data || data.length === 0) &&
(search !== "" || !isSearching) && search !== "" &&
searchPlaceholderKey && !isSearching &&
!emptyState && ( searchPlaceholderKey && (
<ListEmptyState <ListEmptyState
hasIcon={true} hasIcon={true}
icon={icon} icon={icon}