Skip to content
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

Merged
merged 5 commits into from Sep 24, 2020
Merged

refactor: Portal render sync #150

merged 5 commits into from Sep 24, 2020

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.

None yet

3 participants