diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx index f93646eb120ab..5a60030cdfcf5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/tags.tsx @@ -8,9 +8,16 @@ import { EuiToolTip } from '@elastic/eui'; import { take } from 'lodash'; import React from 'react'; +import styled from 'styled-components'; import { truncateTag, MAX_TAG_DISPLAY_LENGTH } from '../utils'; +const Wrapped = styled.div` + .wrappedText { + white-space: pre-wrap; + } +`; + interface Props { tags: string[]; } @@ -22,13 +29,16 @@ export const Tags: React.FunctionComponent = ({ tags }) => { return ( <> {tags.length > MAX_TAGS_TO_DISPLAY ? ( - <> - {tags.join(', ')}}> + + {tags.join(', ')}} + > {take(tags, 3).map(truncateTag).join(', ')} + {tags.length - MAX_TAGS_TO_DISPLAY} more - + ) : ( {tags.map((tag, index) => (