Skip to content

Commit

Permalink
Fixes viewer overflow bug (#75489) (#75572)
Browse files Browse the repository at this point in the history
  • Loading branch information
dplumlee authored Aug 20, 2020
1 parent 900100d commit cf12eac
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
EuiTableFieldDataColumnType,
EuiHideFor,
EuiBadge,
EuiBadgeGroup,
} from '@elastic/eui';
import React, { useMemo } from 'react';
import styled, { css } from 'styled-components';
Expand Down Expand Up @@ -60,6 +61,10 @@ const MyNestedValue = styled.span`
margin-left: ${({ theme }) => theme.eui.euiSizeS};
`;

const ValueBadgeGroup = styled(EuiBadgeGroup)`
width: 100%;
`;

interface ExceptionEntriesComponentProps {
entries: FormattedEntry[];
disableDelete: boolean;
Expand Down Expand Up @@ -115,15 +120,11 @@ const ExceptionEntriesComponent = ({
render: (values: string | string[] | null) => {
if (Array.isArray(values)) {
return (
<EuiFlexGroup gutterSize="xs" direction="row" justifyContent="flexStart">
<ValueBadgeGroup gutterSize="xs">
{values.map((value) => {
return (
<EuiFlexItem key={value} grow={false}>
<EuiBadge color="#DDD">{value}</EuiBadge>
</EuiFlexItem>
);
return <EuiBadge color="#DDD">{value}</EuiBadge>;
})}
</EuiFlexGroup>
</ValueBadgeGroup>
);
} else {
return values ?? getEmptyValue();
Expand Down

0 comments on commit cf12eac

Please sign in to comment.