Skip to content

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Sep 23, 2020

原本通过 componentDidMount 创建 div 来放节点,导致即便配置 forceRender,第一次 useEffect 还是没有东西。改成同步创建,帮忙检查一下。

@afc163 @shaodahong

ref ant-design/ant-design#26545

@coveralls
Copy link

coveralls commented Sep 23, 2020

Coverage Status

Coverage increased (+9.3%) to 39.152% when pulling c802206 on portal-sync into 69046a6 on master.

@@ -40,8 +40,42 @@ const getParent = getContainer => {
return document.body;
};

class PortalWrapper extends React.Component {
constructor(props) {
export type GetContainer = string | HTMLElement | (() => HTMLElement);
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

这边的支持的更多一些:

const getParent = getContainer => {

Copy link
Member

@shaodahong shaodahong left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants