diff --git a/src/components/search_bar/search_bar.tsx b/src/components/search_bar/search_bar.tsx index 72c9adc77c7..bab5a1e8d49 100644 --- a/src/components/search_bar/search_bar.tsx +++ b/src/components/search_bar/search_bar.tsx @@ -131,10 +131,8 @@ interface State { isHintVisible: boolean; } -// `state.query` is never null, but can be passed as `null` to `notifyControllingParent` -// when `error` is not null. -type StateWithOptionalQuery = Omit & { - query: Query | null; +type NotifyControllingParent = Pick & { + query: Query | null; // `state.query` is never null, but can be passed as `null` when an error is present }; export class EuiSearchBar extends Component { @@ -175,7 +173,7 @@ export class EuiSearchBar extends Component { return null; } - notifyControllingParent(newState: StateWithOptionalQuery) { + notifyControllingParent(newState: NotifyControllingParent) { const { onChange } = this.props; if (!onChange) { return; diff --git a/src/components/search_bar/search_box.tsx b/src/components/search_bar/search_box.tsx index 671913664c7..85a78d3a726 100644 --- a/src/components/search_bar/search_box.tsx +++ b/src/components/search_bar/search_box.tsx @@ -83,7 +83,7 @@ export class EuiSearchBox extends Component { }} panelProps={{ 'aria-live': undefined, - 'aria-modal': false, + 'aria-modal': undefined, role: undefined, tabIndex: -1, id: hint.id,