From 3c6120a362ee7e9d111e473144864e2f79eae36e Mon Sep 17 00:00:00 2001 From: Youssef Date: Wed, 24 Nov 2021 20:59:04 +0100 Subject: [PATCH] fix: typo in function name + remove unused value state --- frontend/src/component/common/SearchField/SearchField.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/common/SearchField/SearchField.jsx b/frontend/src/component/common/SearchField/SearchField.jsx index 8807186039..dd404b85a5 100644 --- a/frontend/src/component/common/SearchField/SearchField.jsx +++ b/frontend/src/component/common/SearchField/SearchField.jsx @@ -7,13 +7,13 @@ import SearchIcon from '@material-ui/icons/Search'; import { useStyles } from './styles'; -function SearchField({ value = '', updateValue, className }) { +function SearchField({ updateValue, className }) { const styles = useStyles(); - const [localValue, setLocalValue] = useState(value); + const [localValue, setLocalValue] = useState(''); const debounceUpdateValue = debounce(updateValue, 500); - const handleCange = e => { + const handleChange = e => { e.preventDefault(); const v = e.target.value || ''; setLocalValue(v); @@ -42,7 +42,7 @@ function SearchField({ value = '', updateValue, className }) { }} inputProps={{ 'aria-label': 'search' }} value={localValue} - onChange={handleCange} + onChange={handleChange} onBlur={updateNow} onKeyPress={handleKeyPress} />