mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
refactor: restore search query string from localStorage (#715)
This commit is contained in:
parent
f862489fe8
commit
492435e1e4
@ -46,7 +46,7 @@ export const ApplicationList = () => {
|
||||
return (
|
||||
<>
|
||||
<div className={commonStyles.searchField}>
|
||||
<SearchField value={filter} updateValue={setFilter} />
|
||||
<SearchField initialValue={filter} updateValue={setFilter} />
|
||||
</div>
|
||||
<PageContent headerContent={<HeaderTitle title="Applications" />}>
|
||||
<div className={commonStyles.fullwidth}>
|
||||
|
@ -7,10 +7,10 @@ import SearchIcon from '@material-ui/icons/Search';
|
||||
|
||||
import { useStyles } from './styles';
|
||||
|
||||
function SearchField({ updateValue, className = '' }) {
|
||||
function SearchField({ initialValue = '', updateValue, className = '' }) {
|
||||
const styles = useStyles();
|
||||
|
||||
const [localValue, setLocalValue] = useState('');
|
||||
const [localValue, setLocalValue] = useState(initialValue);
|
||||
const debounceUpdateValue = debounce(updateValue, 500);
|
||||
|
||||
const handleChange = e => {
|
||||
|
@ -107,6 +107,7 @@ const FeatureToggleList = ({
|
||||
<div className={styles.featureContainer}>
|
||||
<div className={styles.searchBarContainer}>
|
||||
<SearchField
|
||||
initialValue={filter.query}
|
||||
updateValue={setFilterQuery}
|
||||
className={classnames(styles.searchBar, {
|
||||
skeleton: loading,
|
||||
|
Loading…
Reference in New Issue
Block a user