Added empty state to add scope dialog (#2291)
This commit is contained in:
parent
e641af0b16
commit
b2d507a390
3 changed files with 10 additions and 1 deletions
|
@ -229,6 +229,8 @@ export default {
|
||||||
},
|
},
|
||||||
applyPolicy: "Apply policy",
|
applyPolicy: "Apply policy",
|
||||||
addClientScopes: "Add client scopes",
|
addClientScopes: "Add client scopes",
|
||||||
|
emptyAddClientScopes: "No client scopes",
|
||||||
|
emptyAddClientScopesInstructions: "There are no client scopes left to add",
|
||||||
clientScope: "Client scope",
|
clientScope: "Client scope",
|
||||||
groupsClaim: "Groups claim",
|
groupsClaim: "Groups claim",
|
||||||
addGroups: "Add groups",
|
addGroups: "Add groups",
|
||||||
|
|
|
@ -26,6 +26,7 @@ import {
|
||||||
clientScopeTypesDropdown,
|
clientScopeTypesDropdown,
|
||||||
} from "../../components/client-scope/ClientScopeTypes";
|
} from "../../components/client-scope/ClientScopeTypes";
|
||||||
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";
|
import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTable";
|
||||||
|
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
|
||||||
import { getProtocolName } from "../utils";
|
import { getProtocolName } from "../utils";
|
||||||
import useToggle from "../../utils/useToggle";
|
import useToggle from "../../utils/useToggle";
|
||||||
|
|
||||||
|
@ -302,6 +303,12 @@ export const AddScopeDialog = ({
|
||||||
name: "description",
|
name: "description",
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
emptyState={
|
||||||
|
<ListEmptyState
|
||||||
|
message={t("emptyAddClientScopes")}
|
||||||
|
instructions={t("emptyAddClientScopesInstructions")}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
@ -251,7 +251,7 @@ export function KeycloakDataTable<T>({
|
||||||
return getNodeText(
|
return getNodeText(
|
||||||
isValidElement((node as TitleCell).title)
|
isValidElement((node as TitleCell).title)
|
||||||
? (node as TitleCell).title.props?.children
|
? (node as TitleCell).title.props?.children
|
||||||
: (node as JSX.Element).props.children
|
: (node as JSX.Element).props?.children
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Reference in a new issue