Skip to content

Commit

Permalink
fix truncation issue (elastic#83000)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Nov 12, 2020
1 parent 7c99763 commit 318a50a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/core/public/chrome/ui/header/header_breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { EuiHeaderBreadcrumbs } from '@elastic/eui';
import { EuiFlexGroup, EuiHeaderBreadcrumbs } from '@elastic/eui';
import classNames from 'classnames';
import React from 'react';
import useObservable from 'react-use/lib/useObservable';
Expand Down Expand Up @@ -51,15 +51,14 @@ export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$, breadcrumbsAppendEx
),
}));

if (breadcrumbsAppendExtension) {
if (breadcrumbsAppendExtension && crumbs[crumbs.length - 1]) {
const lastCrumb = crumbs[crumbs.length - 1];
lastCrumb.text = (
<>
{lastCrumb.text}
<HeaderExtension extension={breadcrumbsAppendExtension.content} display={'inlineBlock'} />
</>
<EuiFlexGroup responsive={false} gutterSize={'none'} alignItems={'baseline'}>
<div className="eui-textTruncate">{lastCrumb.text}</div>
<HeaderExtension extension={breadcrumbsAppendExtension.content} />
</EuiFlexGroup>
);
}

return <EuiHeaderBreadcrumbs breadcrumbs={crumbs} max={10} data-test-subj="breadcrumbs" />;
}

0 comments on commit 318a50a

Please sign in to comment.