join title and expand section together (#20590)
* join title and expand section together fixes: #20329 * but expandable inside <li>
This commit is contained in:
parent
d045156ba4
commit
cbed5849f5
1 changed files with 32 additions and 31 deletions
|
@ -12,7 +12,6 @@ import {
|
||||||
|
|
||||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||||
import { TableToolbar } from "../components/table-toolbar/TableToolbar";
|
import { TableToolbar } from "../components/table-toolbar/TableToolbar";
|
||||||
import { isDefined } from "ui-shared";
|
|
||||||
|
|
||||||
export const ProviderInfo = () => {
|
export const ProviderInfo = () => {
|
||||||
const { t } = useTranslation("dashboard");
|
const { t } = useTranslation("dashboard");
|
||||||
|
@ -56,19 +55,19 @@ export const ProviderInfo = () => {
|
||||||
<Td>{name}</Td>
|
<Td>{name}</Td>
|
||||||
<Td>
|
<Td>
|
||||||
<ul>
|
<ul>
|
||||||
{Object.entries(providers).map(([key]) => (
|
{Object.entries(providers).map(
|
||||||
<li key={key}>{key}</li>
|
([key, { operationalInfo }]) => (
|
||||||
))}
|
<li key={key}>
|
||||||
</ul>
|
{key}
|
||||||
{Object.entries(providers)
|
{operationalInfo ? (
|
||||||
.map(([key, { operationalInfo }]) =>
|
|
||||||
operationalInfo ? (
|
|
||||||
<ExpandableSection
|
<ExpandableSection
|
||||||
key={key}
|
key={key}
|
||||||
isExpanded={open.includes(key)}
|
isExpanded={open.includes(key)}
|
||||||
onToggle={() => toggleOpen(key)}
|
onToggle={() => toggleOpen(key)}
|
||||||
toggleText={
|
toggleText={
|
||||||
open.includes(key) ? t("showLess") : t("showMore")
|
open.includes(key)
|
||||||
|
? t("showLess")
|
||||||
|
: t("showMore")
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<TableComposable borders={false}>
|
<TableComposable borders={false}>
|
||||||
|
@ -84,9 +83,11 @@ export const ProviderInfo = () => {
|
||||||
</Tbody>
|
</Tbody>
|
||||||
</TableComposable>
|
</TableComposable>
|
||||||
</ExpandableSection>
|
</ExpandableSection>
|
||||||
) : null
|
) : null}
|
||||||
|
</li>
|
||||||
)
|
)
|
||||||
.filter(isDefined)}
|
)}
|
||||||
|
</ul>
|
||||||
</Td>
|
</Td>
|
||||||
</Tr>
|
</Tr>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in a new issue