aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/DevicesList.js2
-rw-r--r--modern/src/MainPage.js12
-rw-r--r--modern/src/store/devices.js1
3 files changed, 7 insertions, 8 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js
index fdbdfcdf..10ac4fc7 100644
--- a/modern/src/DevicesList.js
+++ b/modern/src/DevicesList.js
@@ -137,7 +137,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick, filter }) => {
useEffect(() => {
setFilteredItems(
filter.trim().length > 0
- ? items.filter((item) => `${item.name} ${item.uniqueId} ${item.groupId}`.toLowerCase().includes(filter?.toLowerCase()))
+ ? items.filter((item) => `${item.name} ${item.uniqueId}`.toLowerCase().includes(filter?.toLowerCase()))
: items,
);
}, [filter, items]);
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js
index b20c1264..0176c7f0 100644
--- a/modern/src/MainPage.js
+++ b/modern/src/MainPage.js
@@ -98,7 +98,7 @@ const MainPage = () => {
const isTablet = useMediaQuery(theme.breakpoints.down('md'));
const isPhone = useMediaQuery(theme.breakpoints.down('xs'));
- const [deviceName, setDeviceName] = useState('');
+ const [searchKeyword, setSearchKeyword] = useState('');
const [collapsed, setCollapsed] = useState(false);
const handleClose = () => {
@@ -139,11 +139,11 @@ const MainPage = () => {
)}
<TextField
fullWidth
- name="deviceName"
- value={deviceName}
- autoComplete="deviceName"
+ name="searchKeyword"
+ value={searchKeyword}
+ autoComplete="searchKeyword"
autoFocus
- onChange={(event) => setDeviceName(event.target.value)}
+ onChange={(event) => setSearchKeyword(event.target.value)}
placeholder="Search Devices"
variant="filled"
/>
@@ -158,7 +158,7 @@ const MainPage = () => {
</Toolbar>
</Paper>
<div className={classes.deviceList}>
- <DevicesList filter={deviceName} />
+ <DevicesList filter={searchKeyword} />
</div>
</Paper>
<BottomMenu />
diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js
index 52a002dc..cca23cb9 100644
--- a/modern/src/store/devices.js
+++ b/modern/src/store/devices.js
@@ -5,7 +5,6 @@ const { reducer, actions } = createSlice({
initialState: {
items: {},
selectedId: null,
- filteredItems: {},
},
reducers: {
refresh(state, action) {