don't close the dropdown when clicking next or previous (#33765)

related: #33616

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-10-11 14:21:26 +02:00 committed by GitHub
parent 243e357173
commit ee56ea9923
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,7 +200,12 @@ export const RealmSelector = () => {
{(realms.length !== 0
? [
first !== 0 ? (
<DropdownItem onClick={() => setFirst(first - MAX_RESULTS)}>
<DropdownItem
onClick={(e) => {
e.stopPropagation();
setFirst(first - MAX_RESULTS);
}}
>
<AngleLeftIcon /> {t("previous")}
</DropdownItem>
) : (
@ -224,7 +229,12 @@ export const RealmSelector = () => {
</DropdownItem>
)),
realms.length > MAX_RESULTS ? (
<DropdownItem onClick={() => setFirst(first + MAX_RESULTS)}>
<DropdownItem
onClick={(e) => {
e.stopPropagation();
setFirst(first + MAX_RESULTS);
}}
>
<AngleRightIcon />
{t("next")}
</DropdownItem>