This commit is contained in:
Jan Prochazka
2021-01-23 07:22:09 +01:00
parent 37cc86f8d2
commit 451af5d09f
141 changed files with 763 additions and 787 deletions

View File

@@ -9,7 +9,7 @@ const StyledInput = styled.input`
`;
export default function SearchInput({ placeholder, filter, setFilter, inputRef = undefined }) {
const handleKeyDown = (ev) => {
const handleKeyDown = ev => {
if (ev.keyCode == keycodes.escape) {
setFilter('');
}
@@ -20,8 +20,8 @@ export default function SearchInput({ placeholder, filter, setFilter, inputRef =
type="text"
placeholder={placeholder}
value={filter}
onChange={(e) => setFilter(e.target.value)}
onFocus={(e) => e.target.select()}
onChange={e => setFilter(e.target.value)}
onFocus={e => e.target.select()}
onKeyDown={handleKeyDown}
/>
);