Skip to content

Commit

Permalink
[Mappings editor] Fix clear searchbox (#54880)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga authored Jan 16, 2020
1 parent 0f924f5 commit 41f7203
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ export const DocumentFieldsHeader = React.memo(({ searchValue, onSearchChange }:
}
)}
value={searchValue}
onChange={e => onSearchChange(e.target.value)}
onChange={e => {
// Temporary fix until EUI fixes the contract
// See my comment https://github.com/elastic/eui/pull/2723/files#r366725059
if (typeof e === 'string') {
onSearchChange(e);
} else {
onSearchChange(e.target.value);
}
}}
aria-label={i18n.translate(
'xpack.idxMgmt.mappingsEditor.documentFields.searchFieldsAriaLabel',
{
Expand Down

0 comments on commit 41f7203

Please sign in to comment.