mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 01:22:49 +00:00
fix
This commit is contained in:
@@ -227,12 +227,18 @@ export function AmharicDatePicker({
|
||||
trapFocus
|
||||
withArrow
|
||||
withinPortal
|
||||
// Inside a Modal, the target sits in a scrollable container — floating-ui's
|
||||
// default flip middleware measures room against that scroll container, not
|
||||
// the viewport, and flips the dropdown above the field where it runs off
|
||||
// the top of the screen. Keeping it pinned below and letting shift nudge it
|
||||
// sideways instead avoids that.
|
||||
middlewares={{ flip: false, shift: true }}
|
||||
// The field lives inside a Modal's scrollable body while the dropdown is
|
||||
// portaled to <body> — a different scroll container than its reference.
|
||||
// The default `absolute` strategy sums offsets across that scroll chain
|
||||
// and can get it wrong (dropdown flipped off-screen, or not following
|
||||
// the field as the modal scrolls). `fixed` positions purely off the
|
||||
// reference's viewport rect, sidestepping that.
|
||||
floatingStrategy="fixed"
|
||||
// Prevents the dropdown from re-flipping position mid-interaction —
|
||||
// switching months resizes the grid (Pagume has far fewer days), which
|
||||
// otherwise nudges the floating box right as a nav click lands, making
|
||||
// the click miss.
|
||||
preventPositionChangeWhenVisible
|
||||
>
|
||||
<Popover.Target>
|
||||
<TextInput
|
||||
|
||||
Reference in New Issue
Block a user