Skip to content

Commit

Permalink
Fixed search field
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 11, 2021
1 parent 0c93280 commit 1207016
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ui/src/app/dashboard/component/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@ export function Search ({ entities, searchable, children }) {
}
}, [query, entities, searchable]);

const handleSubmit = (evt) => {
evt.preventDefault();
search(query);
}

return (
<>
<Form className="w-50">
<Form className="w-50" noValidate onSubmit={(evt) => handleSubmit(evt)}>
<Form.Group>
<Form.Label htmlFor="search" className="sr-only">Search</Form.Label>
<InputGroup>
<Form.Control type="email" name="email" id="search"
placeholder="Search Files" onChange={ (event) => search(event.target.value) }
<Form.Control type="text" name="search" id="search"
placeholder="Search Files"
onChange={ (event) => search(event.target.value) }
value={query} />
<InputGroup.Append>
<Button variant="outline-primary" className="px-3" onClick={ () => search('') }>Clear</Button>
<Button type="button" variant="outline-primary" className="px-3" onClick={ () => search('') }>Clear</Button>
</InputGroup.Append>
</InputGroup>
</Form.Group>
Expand Down

0 comments on commit 1207016

Please sign in to comment.