fix: Lowercase the search term before searching users table (#31070)

* Lowercase the search string when searching for users.

* Switch the lowercasing to be done to the query hook param.
This commit is contained in:
Ivan Vasilov authored and GitHub committed 2024-12-13 15:01:36 +01:00
1 parent 464f9aa5dd
commit d08719e2bb
2 files changed
+3 -3

No files matched your search

@@ -205,7 +205,7 @@ export const UsersV2 = () => {
onKeyDown={(e) => {
if (e.code === 'Enter') {
setSearch(search.trim())
setFilterKeywords(search.trim())
setFilterKeywords(search.trim().toLocaleLowerCase())
}
}}
actions={[
@@ -32,7 +32,7 @@ const UserImpersonationSelector = () => {
{
projectRef: project?.ref,
connectionString: project?.connectionString,
keywords: debouncedSearchText,
keywords: debouncedSearchText.trim().toLocaleLowerCase(),
},
{
keepPreviousData: true,
@@ -95,7 +95,7 @@ const UserImpersonationSelector = () => {
)
}
placeholder="Search for a user.."
onChange={(e) => setSearchText(e.target.value.trim())}
onChange={(e) => setSearchText(e.target.value)}
value={searchText}
size="small"
actions={