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

fix: dialog is not visible, when initialize dialog with forceRender a… #194

Merged
merged 2 commits into from Aug 19, 2020

Conversation

LiJiahaoCoder
Copy link
Contributor

@LiJiahaoCoder LiJiahaoCoder commented Aug 9, 2020

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 重构
  • 功能增强
  • 国际化改进
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

#25999

💡 需求背景和解决方案

  1. 要解决的问题
    在使用Dialog时,同时将 forceRendervisible 设为 true,则只显示mask,无法正常显示dialog

  2. 如何解决

componentDidMount() {
   // ...
    if (this.props.forceRender && this.props.visible) {
      return;
    }
    if (
      (this.props.forceRender || (this.props.getContainer === false && !this.props.visible)) &&
      this.wrap
    ) {
        // ....
    }
}

📝 更新日志怎么写?

语言 更新描述
🇺🇸 英文 Fix dialog component will only show mask, if initialize a Dialog component with both forceRender and visible are true
🇨🇳 中文 修复因同时设置 forceRendervisibletrue 而导致的只显示mask,无法正常显示 Dialog 组件问题

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 91.429% when pulling 92684a0 on LiJiahaoCoder:master into d96907a on react-component:master.

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