Flip popover placement automatically to prevent overflow (#2156)
This commit is contained in:
parent
6514ec5796
commit
bf34ac7767
@ -12,6 +12,7 @@ import {
|
||||
arrow,
|
||||
autoPlacement,
|
||||
computePosition,
|
||||
flip,
|
||||
hide,
|
||||
inline,
|
||||
offset,
|
||||
@ -46,6 +47,7 @@ function positionFloating({
|
||||
floating: FloatingElement,
|
||||
): Promise<void> {
|
||||
const middleware: Middleware[] = [
|
||||
flip(),
|
||||
offset(offsetArg),
|
||||
shift({ padding: shiftArg }),
|
||||
arrow({ element: arrowElement, padding: 5 }),
|
||||
|
Loading…
Reference in New Issue
Block a user