eleven-solutions-common-website-unique-web 20.0.27 → 20.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,10 +33,10 @@ const Users = ({ url }) => {
|
|
33
33
|
};
|
34
34
|
const [currentPage, setCurrentPage] = useState(1);
|
35
35
|
const itemsPerPage = 10;
|
36
|
-
const filteredUsers = users.filter((user) => searchTerm.length >= 2 &&
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
const filteredUsers = users.filter((user) => (searchTerm.length >= 2 &&
|
37
|
+
user.name.toLowerCase().includes(searchTerm.toLowerCase())) ||
|
38
|
+
user.email.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
39
|
+
user.mobile.toString().includes(searchTerm));
|
40
40
|
const totalPages = Math.ceil(filteredUsers.length / itemsPerPage);
|
41
41
|
const handleNextPage = () => {
|
42
42
|
if (currentPage < totalPages) {
|
package/package.json
CHANGED
@@ -37,10 +37,10 @@ const Users = ({ url }: UsersProps) => {
|
|
37
37
|
|
38
38
|
const filteredUsers = users.filter(
|
39
39
|
(user) =>
|
40
|
-
searchTerm.length >= 2 &&
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
(searchTerm.length >= 2 &&
|
41
|
+
user.name.toLowerCase().includes(searchTerm.toLowerCase())) ||
|
42
|
+
user.email.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
43
|
+
user.mobile.toString().includes(searchTerm)
|
44
44
|
);
|
45
45
|
|
46
46
|
const totalPages = Math.ceil(filteredUsers.length / itemsPerPage);
|