Browse Source

fix: Drawer zIndex (#36958)

pull/36964/head
二货爱吃白萝卜 2 years ago
committed by GitHub
parent
commit
3012c77482
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      components/drawer/__tests__/Drawer.test.js
  2. 1
      components/drawer/index.tsx

10
components/drawer/__tests__/Drawer.test.js

@ -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,
});
});
});

1
components/drawer/index.tsx

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

Loading…
Cancel
Save