only start searching on enter and search button click (#28040)
fixes: #27917 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
3ad233b890
commit
b321c4b406
1 changed files with 4 additions and 6 deletions
|
@ -97,16 +97,14 @@ export function UserDataTableToolbarItems({
|
|||
placeholder={t("searchForUser")}
|
||||
aria-label={t("search")}
|
||||
value={searchUser}
|
||||
onChange={(_, value) => {
|
||||
setSearchUser(value);
|
||||
}}
|
||||
onSearch={() => {
|
||||
setSearchUser(searchUser);
|
||||
onSearch={(_, _v, attribute) => {
|
||||
setSearchUser(attribute["haswords"]);
|
||||
refresh();
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
setSearchUser(searchUser);
|
||||
const target = e.target as HTMLInputElement;
|
||||
setSearchUser(target.value);
|
||||
refresh();
|
||||
}
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue