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} /> diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleList.jsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleList.jsx index ee0c1643aa..c123bdb4ae 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleList.jsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleList.jsx @@ -1,4 +1,4 @@ -import { useContext, useLayoutEffect } from 'react'; +import { useContext, useLayoutEffect, useEffect } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { Link } from 'react-router-dom'; @@ -46,6 +46,11 @@ const FeatureToggleList = ({ fetcher(); }, [fetcher]); + useEffect(() => { + updateSetting('filter', ''); + /* eslint-disable-next-line */ + }, []); + const toggleMetrics = () => { updateSetting('showLastHour', !settings.showLastHour); }; @@ -74,7 +79,6 @@ const FeatureToggleList = ({ hasAccess={hasAccess} className={'skeleton'} flags={flags} - archive={archive} /> )); } @@ -125,7 +129,6 @@ const FeatureToggleList = ({