We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在设置了visible属性后,组件变为受控组件,这时想要实现“点击Popup外部关闭Popup”不够方便,要么手搓js监听事件来改变visible值;当然社区也有提供一些方案,方便处理该问题,比如react-cool-onclickoutside,但受限于Popup没有接收ref属性,导致无法实现该功能。
建议方案一: 增加一个事件onClickOut,在点击Popup之外的元素触发
建议方案二: 接收外部传入的ref属性,使其可以使用社区方案快速实现
The text was updated successfully, but these errors were encountered:
👋 @2ue,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
onVisibleChange就可以了吧
onVisibleChange
No branches or pull requests
这个功能解决了什么问题
在设置了visible属性后,组件变为受控组件,这时想要实现“点击Popup外部关闭Popup”不够方便,要么手搓js监听事件来改变visible值;当然社区也有提供一些方案,方便处理该问题,比如react-cool-onclickoutside,但受限于Popup没有接收ref属性,导致无法实现该功能。
你建议的方案是什么
建议方案一:
增加一个事件onClickOut,在点击Popup之外的元素触发
建议方案二:
接收外部传入的ref属性,使其可以使用社区方案快速实现
The text was updated successfully, but these errors were encountered: