fix: Drawer zIndex (#36958)

This commit is contained in:
二货爱吃白萝卜 2022-08-08 22:09:51 +08:00 committed by GitHub
parent fdaa946f24
commit 3012c77482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -198,4 +198,14 @@ describe('Drawer', () => {
errorSpy.mockRestore();
});
it('zIndex should work', () => {
const { container } = render(<Drawer getContainer={false} visible zIndex={903} />);
expect(container.querySelector('.ant-drawer-mask')).toHaveStyle({
zIndex: 903,
});
expect(container.querySelector('.ant-drawer-content-wrapper')).toHaveStyle({
zIndex: 903,
});
});
});

View File

@ -52,7 +52,6 @@ function Drawer({
className,
visible,
children,
zIndex,
style,
title,
headerStyle,