From 0fd730a1077f30f54180c47fbe8dc44165ce542d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Fri, 20 Oct 2023 01:53:15 -0500 Subject: [PATCH] feat: Popconfirm support z-index manager (#45421) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Popconfirm support z-index manager * Update components/popconfirm/__tests__/index.test.tsx Signed-off-by: kiner-tang(文辉) <1127031143@qq.com> --------- Signed-off-by: kiner-tang(文辉) <1127031143@qq.com> --- .../popconfirm/__tests__/index.test.tsx | 29 ++++++++ components/popconfirm/index.tsx | 73 +++++++++++-------- 2 files changed, 70 insertions(+), 32 deletions(-) diff --git a/components/popconfirm/__tests__/index.test.tsx b/components/popconfirm/__tests__/index.test.tsx index 2d6f11e080..dc66d15fc8 100644 --- a/components/popconfirm/__tests__/index.test.tsx +++ b/components/popconfirm/__tests__/index.test.tsx @@ -5,6 +5,7 @@ import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils'; import Button from '../../button'; +import { Select } from 'antd'; describe('Popconfirm', () => { mountTest(Popconfirm); @@ -322,4 +323,32 @@ describe('Popconfirm', () => { expect(onOpenChange).toHaveBeenCalledTimes(1); expect(onVisibleChange).toHaveBeenCalledTimes(1); }); + it('z-index should be accumulated in nested Popconfirm', () => { + const options = [ + { + label: 'Option 1', + value: '1', + }, + { + label: 'Option 2', + value: '2', + }, + ]; + render( + <> + + +