Added empty state to add scope dialog (#2291)

This commit is contained in:
Erik Jan de Wit 2022-03-22 12:58:49 +01:00 committed by GitHub
parent e641af0b16
commit b2d507a390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -229,6 +229,8 @@ export default {
},
applyPolicy: "Apply policy",
addClientScopes: "Add client scopes",
emptyAddClientScopes: "No client scopes",
emptyAddClientScopesInstructions: "There are no client scopes left to add",
clientScope: "Client scope",
groupsClaim: "Groups claim",
addGroups: "Add groups",

View file

@ -26,6 +26,7 @@ import {
clientScopeTypesDropdown,
} from "../../components/client-scope/ClientScopeTypes";
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
import { getProtocolName } from "../utils";
import useToggle from "../../utils/useToggle";
@ -302,6 +303,12 @@ export const AddScopeDialog = ({
name: "description",
},
]}
emptyState={
<ListEmptyState
message={t("emptyAddClientScopes")}
instructions={t("emptyAddClientScopesInstructions")}
/>
}
/>
</Modal>
);

View file

@ -251,7 +251,7 @@ export function KeycloakDataTable<T>({
return getNodeText(
isValidElement((node as TitleCell).title)
? (node as TitleCell).title.props?.children
: (node as JSX.Element).props.children
: (node as JSX.Element).props?.children
);
}
return "";