Skip to content

Commit

Permalink
feat(Popper): add prop strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
EldarMuhamethanov committed Jan 23, 2025
1 parent fda620d commit c34a5f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vkui/src/components/Popper/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type AllowedFloatingComponentProps = Pick<
| 'hideWhenReferenceHidden'
| 'sameWidth'
| 'zIndex'
| 'strategy'
| 'usePortal'
| 'customMiddlewares'
| 'onPlacementChange'
Expand Down Expand Up @@ -103,6 +104,7 @@ export const Popper = ({

// UseFloatingProps
autoUpdateOnTargetResize = false,
strategy: strategyProp = 'fixed',

// ArrowProps
arrowProps,
Expand Down Expand Up @@ -143,6 +145,7 @@ export const Popper = ({
middlewareData,
} = useFloating({
placement: strictPlacement,
strategy: strategyProp,
middleware: middlewares,
whileElementsMounted(...args) {
/* istanbul ignore next: не знаю как проверить */
Expand Down

0 comments on commit c34a5f2

Please sign in to comment.