Normalize search targets to lowercase in accounts tables
This commit is contained in:
@@ -49,7 +49,10 @@ export function AccountInvitationsTable({
|
||||
|
||||
const filteredInvitations = invitations.filter((member) => {
|
||||
const searchString = search.toLowerCase();
|
||||
const email = member.email.split('@')[0]?.toLowerCase() ?? '';
|
||||
|
||||
const email = (
|
||||
member.email.split('@')[0]?.toLowerCase() ?? ''
|
||||
).toLowerCase();
|
||||
|
||||
return (
|
||||
email.includes(searchString) ||
|
||||
|
||||
@@ -78,7 +78,12 @@ export function AccountMembersTable({
|
||||
const filteredMembers = members
|
||||
.filter((member) => {
|
||||
const searchString = search.toLowerCase();
|
||||
const displayName = member.name ?? member.email.split('@')[0];
|
||||
|
||||
const displayName = (
|
||||
member.name ??
|
||||
member.email.split('@')[0] ??
|
||||
''
|
||||
).toLowerCase();
|
||||
|
||||
return (
|
||||
displayName.includes(searchString) ||
|
||||
|
||||
Reference in New Issue
Block a user