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(module: modal): dom cannot be destroyed when the page changed on DestroyOnClose is false #799

Merged
merged 2 commits into from
Nov 18, 2020

Conversation

zxyao145
Copy link
Member

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#757

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English When the page changes, the dom of the modal component whose destroyonclose is false is automatically deleted
🇨🇳 Chinese 当页面发生变化时自动删除DestroyOnClose为false的Modal组件的DOM

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@zxyao145 zxyao145 linked an issue Nov 17, 2020 that may be closed by this pull request
@codecov-io
Copy link

Codecov Report

Merging #799 (0c72d3d) into master (f01ee92) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #799      +/-   ##
=========================================
- Coverage    3.67%   3.66%   -0.01%     
=========================================
  Files         395     395              
  Lines       17481   17504      +23     
=========================================
  Hits          642     642              
- Misses      16839   16862      +23     
Impacted Files Coverage Δ
components/core/JsInterop/JSInteropConstants.cs 7.89% <0.00%> (-0.22%) ⬇️
components/modal/Modal.razor.cs 0.00% <0.00%> (ø)
components/modal/ModalServiceForModal.cs 0.00% <0.00%> (ø)
components/badge/BadgeRibbon.razor 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f01ee92...0c72d3d. Read the comment docs.

@zxyao145 zxyao145 linked an issue Nov 18, 2020 that may be closed by this pull request
@@ -424,6 +424,12 @@ export function enableBodyScroll() {
removeCls(document.body, "ant-scrolling-effect");
}

export function destroyAllDialog() {
console.log(document.querySelectorAll('.ant-modal-root').length);
Copy link
Member

Choose a reason for hiding this comment

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

please remove this line of console.log

@ElderJames ElderJames merged commit 827ee78 into ant-design-blazor:master Nov 18, 2020
ElderJames pushed a commit that referenced this pull request Apr 23, 2022
…DestroyOnClose is false (#799)

* fix(module: modal): dom cannot be destroyed when the page changed

* chore: remove console.log info of debug
ElderJames pushed a commit that referenced this pull request Apr 30, 2022
…DestroyOnClose is false (#799)

* fix(module: modal): dom cannot be destroyed when the page changed

* chore: remove console.log info of debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants