diff --git a/CHANGELOG.md b/CHANGELOG.md index 231552c852b..37696011fad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - Fixed EuiBasicTable proptypes of itemId ([#3133](https://github.com/elastic/eui/pull/3133)) - Updated `EuiSuperDatePicker` to inherit the selected value in quick select ([#3105](https://github.com/elastic/eui/pull/3105)) +- Fixed infinite call stack in `EuiResizeObserver`'s fallback polyfill ([#3180](https://github.com/elastic/eui/pull/3180)) +- Correct `defaultProps` definition in `EuiComboBox` ([#3180](https://github.com/elastic/eui/pull/3180)) ### Feature: EuiCollapsibleNav ([#3019](https://github.com/elastic/eui/pull/3019)) diff --git a/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap b/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap index 1fbb44b9711..6d6cedcf6f5 100644 --- a/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap +++ b/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap @@ -381,7 +381,6 @@ exports[`props singleSelection is rendered 1`] = ` role="combobox" > * `startsWith`: moves items that start with search value to top of the list; * `none`: don't change the sort order of initial object */ - sortMatchesBy?: 'none' | 'startsWith'; + sortMatchesBy: 'none' | 'startsWith'; /** * Creates an input group with element(s) coming before input. It won't show if `singleSelection` is set to `false`. * `string` | `ReactElement` or an array of these @@ -178,9 +178,9 @@ export class EuiComboBox extends Component< options: [], selectedOptions: [], singleSelection: false, - prepend: null, - append: null, - sortMatchesBy: 'none', + prepend: undefined, + append: undefined, + sortMatchesBy: 'none' as const, }; state: EuiComboBoxState = { diff --git a/src/components/observer/resize_observer/resize_observer.tsx b/src/components/observer/resize_observer/resize_observer.tsx index bf10090411e..99f97aee0d2 100644 --- a/src/components/observer/resize_observer/resize_observer.tsx +++ b/src/components/observer/resize_observer/resize_observer.tsx @@ -57,9 +57,9 @@ const makeCompatibleObserver = (node: Element, callback: () => void) => { window.addEventListener('resize', callback); + const _disconnect = observer.disconnect.bind(observer); observer.disconnect = () => { - observer.disconnect(); - + _disconnect(); window.removeEventListener('resize', callback); };