New issue
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
refactor: Portal render sync #150
Conversation
@@ -40,8 +40,42 @@ const getParent = getContainer => { | |||
return document.body; | |||
}; | |||
|
|||
class PortalWrapper extends React.Component { | |||
constructor(props) { | |||
export type GetContainer = string | HTMLElement | (() => HTMLElement); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这边的支持的更多一些:
Line 22 in 69046a6
const getParent = getContainer => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
原本通过
componentDidMount
创建div
来放节点,导致即便配置forceRender
,第一次useEffect
还是没有东西。改成同步创建,帮忙检查一下。@afc163 @shaodahong
ref ant-design/ant-design#26545