aboutsummaryrefslogtreecommitdiff
path: root/modern/src/main/MainPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/main/MainPage.js')
-rw-r--r--modern/src/main/MainPage.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/modern/src/main/MainPage.js b/modern/src/main/MainPage.js
index f5d6d25b..df1c8734 100644
--- a/modern/src/main/MainPage.js
+++ b/modern/src/main/MainPage.js
@@ -73,8 +73,8 @@ const MainPage = () => {
const [filteredDevices, setFilteredDevices] = useState([]);
- const [filter, setFilter] = useState({
- keyword: '',
+ const [keyword, setKeyword] = useState('');
+ const [filter, setFilter] = usePersistedState('filter', {
statuses: [],
groups: [],
});
@@ -92,7 +92,7 @@ const MainPage = () => {
}
}, [desktop, mapOnSelect, selectedDeviceId]);
- useFilter(filter, filterSort, filterMap, positions, setFilteredDevices, setFilteredPositions);
+ useFilter(keyword, filter, filterSort, filterMap, positions, setFilteredDevices, setFilteredPositions);
return (
<div className={classes.root}>
@@ -109,6 +109,8 @@ const MainPage = () => {
filteredDevices={filteredDevices}
devicesOpen={devicesOpen}
setDevicesOpen={setDevicesOpen}
+ keyword={keyword}
+ setKeyword={setKeyword}
filter={filter}
setFilter={setFilter}
filterSort={filterSort}