Skip to content

Commit

Permalink
search on enter key down
Browse files Browse the repository at this point in the history
  • Loading branch information
bandinopla committed Nov 23, 2024
1 parent b94b181 commit 09fe6b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/componentes/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ export const SearchBox = ({ children }) => {

return <>
<div style={{ display:"flex", maxWidth:500, flexDirection:"column", padding:"0 20px", alignContent:"stretch", margin:"20px auto"}}>
<Paper component="form" className={classes.root} elevation={5}>
<Paper className={classes.root} elevation={5}>
<InputBase
className={classes.input}
placeholder="Search: 2020-10-01 squat 140x5x5"
inputProps={{ 'aria-label': 'search google maps' }}
inputRef={inputRef}
onKeyDown={ev=>ev.code=='Enter' && callSearch()}
/>

{active &&
Expand Down

0 comments on commit 09fe6b2

Please sign in to comment.