aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/MaintenancesPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/MaintenancesPage.js')
-rw-r--r--modern/src/settings/MaintenancesPage.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/settings/MaintenancesPage.js b/modern/src/settings/MaintenancesPage.js
index c82629e4..6dc29e56 100644
--- a/modern/src/settings/MaintenancesPage.js
+++ b/modern/src/settings/MaintenancesPage.js
@@ -13,6 +13,7 @@ import SettingsMenu from './components/SettingsMenu';
import CollectionFab from './components/CollectionFab';
import CollectionActions from './components/CollectionActions';
import TableShimmer from '../common/components/TableShimmer';
+import SearchHeader, { filterByKeyword } from './components/SearchHeader';
const useStyles = makeStyles((theme) => ({
columnAction: {
@@ -29,6 +30,7 @@ const MaintenacesPage = () => {
const [timestamp, setTimestamp] = useState(Date.now());
const [items, setItems] = useState([]);
+ const [searchKeyword, setSearchKeyword] = useState('');
const [loading, setLoading] = useState(false);
const speedUnit = useAttributePreference('speedUnit');
const distanceUnit = useAttributePreference('distanceUnit');
@@ -65,6 +67,7 @@ const MaintenacesPage = () => {
return (
<PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedMaintenance']}>
+ <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} />
<Table>
<TableHead>
<TableRow>
@@ -76,7 +79,7 @@ const MaintenacesPage = () => {
</TableRow>
</TableHead>
<TableBody>
- {!loading ? items.map((item) => (
+ {!loading ? items.filter(filterByKeyword(searchKeyword)).map((item) => (
<TableRow key={item.id}>
<TableCell>{item.name}</TableCell>
<TableCell>{item.type}</TableCell>