Widened Search
This commit is contained in:
parent
2f403a9819
commit
6964f49b8b
|
@ -23,7 +23,12 @@ const filterData = (
|
|||
return data.filter(
|
||||
(installation) =>
|
||||
installation.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
installation.location.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
installation.location.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
installation.region.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
installation.information.toLowerCase().includes(searchQuery.toLowerCase())||
|
||||
installation.orderNumbers.includes(searchQuery.toLowerCase())||
|
||||
installation.country.toLowerCase().includes(searchQuery.toLowerCase())||
|
||||
(installation.detail && installation.detail.toLowerCase().includes(searchQuery.toLowerCase()))
|
||||
);
|
||||
}
|
||||
return data;
|
||||
|
|
|
@ -21,8 +21,10 @@ const getPathWithoutId = (path?: string) => {
|
|||
|
||||
const filterData = (searchQuery: string, data: I_User[] | undefined) => {
|
||||
if (data) {
|
||||
return data.filter((installation) =>
|
||||
installation.name.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
return data.filter((user) =>
|
||||
user.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
user.email.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
user.information.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
);
|
||||
}
|
||||
return data;
|
||||
|
|
Loading…
Reference in New Issue