diff options
Diffstat (limited to 'modern/src/settings/DriversPage.js')
-rw-r--r-- | modern/src/settings/DriversPage.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/settings/DriversPage.js b/modern/src/settings/DriversPage.js index 6ea97b31..cbca6bb7 100644 --- a/modern/src/settings/DriversPage.js +++ b/modern/src/settings/DriversPage.js @@ -10,6 +10,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: { @@ -24,6 +25,7 @@ const DriversPage = () => { const [timestamp, setTimestamp] = useState(Date.now()); const [items, setItems] = useState([]); + const [searchKeyword, setSearchKeyword] = useState(''); const [loading, setLoading] = useState(false); useEffectAsync(async () => { @@ -42,6 +44,7 @@ const DriversPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedDrivers']}> + <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> <Table> <TableHead> <TableRow> @@ -51,7 +54,7 @@ const DriversPage = () => { </TableRow> </TableHead> <TableBody> - {!loading ? items.map((item) => ( + {!loading ? items.filter(filterByKeyword(searchKeyword)).map((item) => ( <TableRow key={item.id}> <TableCell>{item.name}</TableCell> <TableCell>{item.uniqueId}</TableCell> |