Set search as case-insensitive for authentication steps (#23406)
Closes #21989
This commit is contained in:
parent
b031aba429
commit
949fb47326
1 changed files with 10 additions and 10 deletions
|
@ -90,16 +90,16 @@ export const AddStepModal = ({ name, type, onSelect }: AddStepModalProps) => {
|
|||
[],
|
||||
);
|
||||
|
||||
const page = useMemo(
|
||||
() =>
|
||||
localeSort(providers ?? [], mapByKey("displayName"))
|
||||
.filter(
|
||||
(p) =>
|
||||
p.displayName?.includes(search) || p.description?.includes(search),
|
||||
)
|
||||
.slice(first, first + max + 1),
|
||||
[providers, search, first, max],
|
||||
);
|
||||
const page = useMemo(() => {
|
||||
const normalizedSearch = search.trim().toLowerCase();
|
||||
return localeSort(providers ?? [], mapByKey("displayName"))
|
||||
.filter(
|
||||
({ displayName, description }) =>
|
||||
displayName?.toLowerCase().includes(normalizedSearch) ||
|
||||
description?.toLowerCase().includes(normalizedSearch),
|
||||
)
|
||||
.slice(first, first + max + 1);
|
||||
}, [providers, search, first, max]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
|
|
Loading…
Reference in a new issue