From 09110fbe8e2be8b8214d17fdc77e97577b3743dc Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Sat, 12 Oct 2019 11:04:02 -0500 Subject: [PATCH 1/2] use euiinnertext instead --- src/components/breadcrumbs/breadcrumbs.tsx | 47 +++++++++++++--------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/components/breadcrumbs/breadcrumbs.tsx b/src/components/breadcrumbs/breadcrumbs.tsx index c4617cc2180..c2e748de77b 100644 --- a/src/components/breadcrumbs/breadcrumbs.tsx +++ b/src/components/breadcrumbs/breadcrumbs.tsx @@ -10,7 +10,7 @@ import classNames from 'classnames'; import { CommonProps } from '../common'; import { EuiBadge } from '../badge'; import { EuiI18n } from '../i18n'; -import { useInnerText } from '../inner_text'; +import { EuiInnerText } from '../inner_text'; import { EuiLink } from '../link'; import { EuiPopover } from '../popover'; @@ -174,31 +174,38 @@ export const EuiBreadcrumbs: FunctionComponent = ({ }); let link; - const [setRef, innerText] = useInnerText(); if (isLastBreadcrumb && !href) { link = ( - - {text} - + + {(ref, innerText) => ( + + {text} + + )} + ); } else { link = ( - - {text} - + + {(ref, innerText) => ( + + {text} + + )} + ); } From 85418128627e089d9ba6c345a7ef0626b38fa200 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Sat, 12 Oct 2019 11:18:30 -0500 Subject: [PATCH 2/2] CL --- CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 298710f9ff7..3e693925ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Added new `EuiColorStops` component ([#2360](https://github.com/elastic/eui/pull/2360)) - Added `currency` glyph to 'EuiIcon' ([#2398](https://github.com/elastic/eui/pull/2398)) - Migrate `EuiBreadcrumbs`, `EuiHeader` etc, and `EuiLink` to TypeScript ([#2391](https://github.com/elastic/eui/pull/2391)) -- Added `hasChildLabel` prop to `EuiFormRow` to avoid duplicate labels ([#2390](https://github.com/elastic/eui/pull/2390)) +- Added `hasChildLabel` prop to `EuiFormRow` to avoid duplicate labels ([#2411](https://github.com/elastic/eui/pull/2411)) - Added `component` prop to `EuiPageBody`, switching the default from `div` to `main` ([#2410](https://github.com/elastic/eui/pull/2410)) - Added focus state to `EuiListGroupItem` ([#2406](https://github.com/elastic/eui/pull/2406)) - Added `keyboardShorcut` glyph to 'EuiIcon ([#2413](https://github.com/elastic/eui/pull/2413)) @@ -12,9 +12,10 @@ **Bug fixes** - Fixed `EuiSelectable` to accept programmatic updates to its `options` prop ([#2390](https://github.com/elastic/eui/pull/2390)) -- Fixed poor labeling in `EuiSuperDatePicker` ([#2390](https://github.com/elastic/eui/pull/2411)) -- Fixed `EuiCodeEditor`'s ID to be dynamic between renders ([#2390](https://github.com/elastic/eui/pull/2411)) -- Fixed `EuiCodeEditor` to not render multiple labels for some inputs ([#2390](https://github.com/elastic/eui/pull/2411)) +- Fixed poor labeling in `EuiSuperDatePicker` ([#2411](https://github.com/elastic/eui/pull/2411)) +- Fixed `EuiCodeEditor`'s ID to be dynamic between renders ([#2411](https://github.com/elastic/eui/pull/2411)) +- Fixed `EuiCodeEditor` to not render multiple labels for some inputs ([#2411](https://github.com/elastic/eui/pull/2411)) +- Fixed `EuiBreadcrumbs` improper use of `useInnerText` hook ([#2425](https://github.com/elastic/eui/pull/2425)) ## [`14.4.0`](https://github.com/elastic/eui/tree/v14.4.0)