In this simple code, when you toggle the width of the Tab by clicking the "Toggle" button, an error will occur (note that you may need to click several times for the error to occur).
I don't expect any error to occur, this is just a normal usage.
What is actually happening?
The error is likely to cause by transition.
when you remove the [ transition: "300ms" ], everything is normal again, the error will not occur anymore.
I also suspect the issue was caused by Dropdown component inside right section of Tab, but i was not able to reproduce the error just only with Dropdown.
Reproduction link
Steps to reproduce
In this simple code, when you toggle the width of the Tab by clicking the "Toggle" button, an error will occur (note that you may need to click several times for the error to occur).
当你点“Toggle”按钮来切换 Tab 的宽度时,看控制面板会有报错(注意,有时需要单击多次才会发生错误)。
Sample Code 案例代码
Error occured 报错
console.js:273 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render. at http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:13775:21 at http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:22088:21 at http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:22850:34 at Dropdown (http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:30441:28) at div at http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:42925:25 at div at DomWrapper4 (http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:1964:5) at SingleObserver (http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:1978:24) at ResizeObserver3 (http://localhost:5174/node_modules/.vite/deps/antd.js?v=6919b019:2055:24)
What is expected?
I don't expect any error to occur, this is just a normal usage.
What is actually happening?
The error is likely to cause by transition. when you remove the [ transition: "300ms" ], everything is normal again, the error will not occur anymore. I also suspect the issue was caused by Dropdown component inside right section of Tab, but i was not able to reproduce the error just only with Dropdown.
当你把transition拿走 [ transition: "300ms" ], 就好像有没问题,也不报错了。 也有可能是 Dropdown 组件的问题,但是我不知道要怎么把这个问题从 Dropdown 挖出来 。