diff --git a/ui/v2.5/src/components/Shared/CustomFields.tsx b/ui/v2.5/src/components/Shared/CustomFields.tsx index a522961a8..e7355df66 100644 --- a/ui/v2.5/src/components/Shared/CustomFields.tsx +++ b/ui/v2.5/src/components/Shared/CustomFields.tsx @@ -8,6 +8,7 @@ import { Icon } from "./Icon"; import { faMinus, faPlus } from "@fortawesome/free-solid-svg-icons"; import cx from "classnames"; import { PatchComponent } from "src/patch"; +import { TruncatedText } from "./TruncatedText"; const maxFieldNameLength = 64; @@ -47,7 +48,7 @@ const CustomField: React.FC<{ field: string; value: unknown }> = ({ id={id} label={field} labelTitle={field} - value={valueStr} + value={{valueStr}} />} fullWidth={true} showEmpty /> diff --git a/ui/v2.5/src/components/Shared/styles.scss b/ui/v2.5/src/components/Shared/styles.scss index 9985138e0..8fdd3883b 100644 --- a/ui/v2.5/src/components/Shared/styles.scss +++ b/ui/v2.5/src/components/Shared/styles.scss @@ -712,6 +712,10 @@ button.btn.favorite-button { .custom-fields { width: 100%; + + .detail-item { + max-width: 100%; + } } .custom-fields .detail-item .detail-item-title { @@ -721,6 +725,14 @@ button.btn.favorite-button { white-space: nowrap; } +.custom-fields .detail-item .detail-item-value { + word-break: break-word; + + .TruncatedText { + white-space: pre-line; + } +} + .custom-fields-input > .collapse-button { font-weight: 700; }