fix(search): Stop clear enter propagation
Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
committed by
Carlos Lopez
parent
d1ffbb5cce
commit
46310ee03f
@@ -133,7 +133,17 @@ export const SearchBarBase: ForwardRefExoticComponent<SearchBarBaseProps> =
|
||||
|
||||
const endAdornment = (
|
||||
<InputAdornment position="end">
|
||||
<Button aria-label="Clear" size="small" onClick={handleClear}>
|
||||
<Button
|
||||
aria-label="Clear"
|
||||
size="small"
|
||||
onClick={handleClear}
|
||||
onKeyDown={event => {
|
||||
if (event.key === 'Enter') {
|
||||
// write your functionality here
|
||||
event.stopPropagation();
|
||||
}
|
||||
}}
|
||||
>
|
||||
Clear
|
||||
</Button>
|
||||
</InputAdornment>
|
||||
|
||||
Reference in New Issue
Block a user