Merge pull request #724 from edewit/description-col-with

fixed description coll with and make text truncate
This commit is contained in:
mfrances17 2021-06-29 09:18:34 -04:00 committed by GitHub
commit 19459edf6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,17 +12,18 @@ import {
TabTitleText,
} from "@patternfly/react-core";
import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
import { emptyFormatter, exportClient, getBaseUrl } from "../util";
import { formattedLinkTableCell } from "../components/external-link/FormattedLink";
import { ViewHeader } from "../components/view-header/ViewHeader";
import { useAdminClient } from "../context/auth/AdminClient";
import { useRealm } from "../context/realm-context/RealmContext";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { emptyFormatter, exportClient, getBaseUrl } from "../util";
import { useAlerts } from "../components/alert/Alerts";
import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
import { formattedLinkTableCell } from "../components/external-link/FormattedLink";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
import { InitialAccessTokenList } from "./initial-access/InitialAccessTokenList";
import { useRealm } from "../context/realm-context/RealmContext";
import { cellWidth, TableText } from "@patternfly/react-table";
export const ClientsSection = () => {
const { t } = useTranslation("clients");
@ -80,6 +81,14 @@ export const ClientsSection = () => {
</>
);
const ClientDescription = (client: ClientRepresentation) => (
<>
<TableText wrapModifier="truncate">
{emptyFormatter()(client.description)}
</TableText>
</>
);
return (
<>
<ViewHeader
@ -150,7 +159,8 @@ export const ClientsSection = () => {
{
name: "description",
displayKey: "common:description",
cellFormatters: [emptyFormatter()],
transforms: [cellWidth(20)],
cellRenderer: ClientDescription,
},
{
name: "baseUrl",