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