Skip to content

Commit

Permalink
fix(popover): the alternative axis check be enabled (#2002)
Browse files Browse the repository at this point in the history
Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin committed May 10, 2022
1 parent a00b766 commit 8582665
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { usePrefixCls } from '@gio-design/utils';
import { PopoverProps } from './interface';
import { composeRef, supportRef } from '../utils/composeRef';
import useControlledState from '../utils/hooks/useControlledState';
import usePop from './usePop';
import usePop, { UsePopProps } from './usePop';
import TriggerContext from './context';

const Popover = (props: PopoverProps) => {
Expand Down Expand Up @@ -77,7 +77,7 @@ const Popover = (props: PopoverProps) => {
[prefixCls, overlayInnerClassName]
);

const defaultModifiers = React.useMemo(
const defaultModifiers = React.useMemo<UsePopProps['modifiers']>(
() => [
{ name: 'arrow', options: { element: arrowElement.current } },
{ name: 'offset', options: { offset } },
Expand All @@ -92,6 +92,7 @@ const Popover = (props: PopoverProps) => {
name: 'preventOverflow',
options: {
boundary: 'window',
altAxis: true,
},
},
],
Expand Down

1 comment on commit 8582665

@vercel
Copy link

@vercel vercel bot commented on 8582665 May 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gio-design – ./

gio-design-growingio.vercel.app
gio-design-git-master-growingio.vercel.app
gio-design.vercel.app

Please sign in to comment.