Open DaJianWu opened 3 months ago
PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6732.surge.sh
CI failed. Pls check
在ref.current.show()前使用e.stopPropagation(); 就不会执行useClickAway的回调。
------------------ Original ------------------ From: wudajian @.> Date: Fri,Aug 30,2024 9:23 AM To: ant-design/ant-design-mobile @.> Cc: Leisure @.>, Comment @.> Subject: Re: [ant-design/ant-design-mobile] fix(Popover): popoverref.current.show() invalid (PR #6732)
@DaJianWu commented on this pull request.
In src/components/popover/popover.tsx:
> @@ -196,6 +200,10 @@ export const Popover = forwardRef<PopoverRef, PopoverProps>((p, ref) => { useClickAway( () => { if (!props.trigger) return + if (stateRef.current.isClickShow) { + stateRef.current.isClickShow = false
没太理解 会导致stateRef.current.isClickShow为true的状态持续在Popover组件内 我在useClickAway把isClickShow改为false了
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
6731