diff --git a/packages/vkui/src/components/Popover/Popover.tsx b/packages/vkui/src/components/Popover/Popover.tsx index a1b7a08978..e447b02ef3 100644 --- a/packages/vkui/src/components/Popover/Popover.tsx +++ b/packages/vkui/src/components/Popover/Popover.tsx @@ -225,9 +225,6 @@ export const Popover = ({ let popover: React.ReactNode = null; if (shown || keepMounted) { const hidden = keepMounted && !shown; - if (!hidden) { - floatingProps.style.zIndex = String(zIndex); - } let arrow: React.ReactElement | null = null; if (withArrow) { @@ -250,6 +247,10 @@ export const Popover = ({ ref={refs.setFloating} className={classNames(styles['Popover'], hidden && styles['Popover--hidden'])} {...floatingProps} + style={{ + zIndex: !hidden ? zIndex : undefined, + ...floatingProps.style, + }} >