ant-design icon indicating copy to clipboard operation
ant-design copied to clipboard

Multiple visible drawers are displayed in the wrong order

Open DVSoftware opened this issue 2 years ago • 2 comments

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Nest multiple drawers that are visible at the same time

What is expected?

Drawers should be displayed in the correct order

What is actually happening?

Drawers are displayed out of order, with the child drawer displayed over the parent drawer

Environment Info
antd 4.23.2
React 18.2.0
System MacOS
Browser Chrome 105

I'm displaying the drawers based on the URL parameters, and everything is fine while the user navigates through the UI, however, when user refreshes the page, the state which is remembered in the URL has both drawers set as visible, and when the page loads, the drawer order is wrong.

DVSoftware avatar Sep 19 '22 16:09 DVSoftware

Workaround with useEffect: https://codesandbox.io/s/antd-reproduction-template-forked-1ngbnd

MadCcc avatar Sep 20 '22 02:09 MadCcc

Yeah, i did something like that, but it would be nice not to have workarounds

DVSoftware avatar Sep 20 '22 05:09 DVSoftware