From 6aff196c901e0e8f6910b39194107135d0a8b309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Wed, 22 Nov 2023 18:02:32 +0800 Subject: [PATCH] fix: Static method provides wrong zIndex context (#46012) * fix: static confirm should has correct zIndex * test: update test case * chore: reorder * fix: bump logic --- components/_util/__tests__/useZIndex.test.tsx | 6 +- components/_util/hooks/useZIndex.tsx | 6 ++ components/modal/ConfirmDialog.tsx | 6 +- .../__snapshots__/demo-extend.test.ts.snap | 69 +++++++++++++------ .../__snapshots__/demo.test.tsx.snap | 69 +++++++++++++------ components/modal/demo/nested.tsx | 11 ++- scripts/post-script.ts | 1 + 7 files changed, 122 insertions(+), 46 deletions(-) diff --git a/components/_util/__tests__/useZIndex.test.tsx b/components/_util/__tests__/useZIndex.test.tsx index a5531cadeeb0..be5da90d1305 100644 --- a/components/_util/__tests__/useZIndex.test.tsx +++ b/components/_util/__tests__/useZIndex.test.tsx @@ -349,7 +349,7 @@ describe('Test useZIndex hooks', () => { const instance = Modal.confirm({ title: 'bamboo', - content: 'little', + content: , + }); + }; + return ( - <> + setIsModalOpen(open)} /> + { {messageHolder} {notificationHolder} - + ); }; diff --git a/scripts/post-script.ts b/scripts/post-script.ts index 501b97aa8ccb..d58f608ab0d4 100644 --- a/scripts/post-script.ts +++ b/scripts/post-script.ts @@ -50,6 +50,7 @@ const DEPRECIATED_VERSION = { '5.10.0': ['https://github.com/ant-design/ant-design/issues/45289'], '5.11.0': ['https://github.com/ant-design/ant-design/issues/45742'], '5.11.1': ['https://github.com/ant-design/ant-design/issues/45883'], + '5.11.2': ['https://github.com/ant-design/ant-design/issues/46005'], } as const; function matchDeprecated(v: string) {