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:
parent
243e357173
commit
ee56ea9923
1 changed files with 12 additions and 2 deletions
|
@ -200,7 +200,12 @@ export const RealmSelector = () => {
|
||||||
{(realms.length !== 0
|
{(realms.length !== 0
|
||||||
? [
|
? [
|
||||||
first !== 0 ? (
|
first !== 0 ? (
|
||||||
<DropdownItem onClick={() => setFirst(first - MAX_RESULTS)}>
|
<DropdownItem
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
setFirst(first - MAX_RESULTS);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<AngleLeftIcon /> {t("previous")}
|
<AngleLeftIcon /> {t("previous")}
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
) : (
|
) : (
|
||||||
|
@ -224,7 +229,12 @@ export const RealmSelector = () => {
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
)),
|
)),
|
||||||
realms.length > MAX_RESULTS ? (
|
realms.length > MAX_RESULTS ? (
|
||||||
<DropdownItem onClick={() => setFirst(first + MAX_RESULTS)}>
|
<DropdownItem
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
setFirst(first + MAX_RESULTS);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<AngleRightIcon />
|
<AngleRightIcon />
|
||||||
{t("next")}
|
{t("next")}
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|
Loading…
Reference in a new issue