pl-fe: Fix floating elements position

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-10-04 00:29:50 +02:00
parent 93e0311984
commit 3fdd22e900
7 changed files with 16 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import { offset, Placement, useFloating, flip, arrow, shift } from '@floating-ui/react';
import { offset, Placement, useFloating, flip, arrow, shift, autoUpdate } from '@floating-ui/react';
import clsx from 'clsx';
import { supportsPassiveEvents } from 'detect-passive-events';
import React, { useEffect, useMemo, useRef, useState } from 'react';
@ -207,6 +207,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
element: arrowRef,
}),
],
whileElementsMounted: autoUpdate,
});
const handleClick: React.EventHandler<