From 4e61ae214d7c9c54851261734837521f2f77b4e5 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 28 Aug 2022 15:14:33 -0700 Subject: Mobile setting search --- modern/src/settings/NotificationsPage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modern/src/settings/NotificationsPage.js') diff --git a/modern/src/settings/NotificationsPage.js b/modern/src/settings/NotificationsPage.js index 3c9a9192..9229e8f1 100644 --- a/modern/src/settings/NotificationsPage.js +++ b/modern/src/settings/NotificationsPage.js @@ -12,6 +12,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: { @@ -26,6 +27,7 @@ const NotificationsPage = () => { const [timestamp, setTimestamp] = useState(Date.now()); const [items, setItems] = useState([]); + const [searchKeyword, setSearchKeyword] = useState(''); const [loading, setLoading] = useState(false); useEffectAsync(async () => { @@ -55,6 +57,7 @@ const NotificationsPage = () => { return ( } breadcrumbs={['settingsTitle', 'sharedNotifications']}> + @@ -66,7 +69,7 @@ const NotificationsPage = () => { - {!loading ? items.map((item) => ( + {!loading ? items.filter(filterByKeyword(searchKeyword)).map((item) => ( {t(prefixString('event', item.type))} {formatBoolean(item.always, t)} -- cgit v1.2.3