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")}
|
placeholder={t("searchForUser")}
|
||||||
aria-label={t("search")}
|
aria-label={t("search")}
|
||||||
value={searchUser}
|
value={searchUser}
|
||||||
onChange={(_, value) => {
|
onSearch={(_, _v, attribute) => {
|
||||||
setSearchUser(value);
|
setSearchUser(attribute["haswords"]);
|
||||||
}}
|
|
||||||
onSearch={() => {
|
|
||||||
setSearchUser(searchUser);
|
|
||||||
refresh();
|
refresh();
|
||||||
}}
|
}}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
setSearchUser(searchUser);
|
const target = e.target as HTMLInputElement;
|
||||||
|
setSearchUser(target.value);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue