Skip to content

Commit

Permalink
Merge pull request #391 from easyops-cn/alex/INFRA-3463
Browse files Browse the repository at this point in the history
fix(): 级联选择如果在弹窗内,点击x会关掉整个弹窗
  • Loading branch information
panzekun authored Oct 21, 2024
2 parents ef53431 + 5519681 commit 7cb6718
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bricks/basic-bricks/src/general-modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,17 @@ export class GeneralModalElement extends UpdatingElement {
nodeName === "div" &&
clickNode.className.includes("ant-modal-wrap")) ||
(buttonNode && buttonNode.className.includes("ant-modal-close")) ||
clickNode.closest("svg")?.getAttribute("data-icon") === "close-circle"
// 如果cascader在modal,点击关闭按钮会误关闭弹窗,这里过滤掉cascader.
(clickNode.closest("svg")?.getAttribute("data-icon") ===
"close-circle" &&
!(
(clickNode.parentNode as HTMLSpanElement)?.classList.contains(
"ant-cascader-picker-clear"
) ||
(
clickNode.parentNode.parentNode as HTMLSpanElement
)?.classList.contains("ant-cascader-picker-clear")
))
) {
this.close();
return;
Expand Down

0 comments on commit 7cb6718

Please sign in to comment.