Reproduction link
Steps to reproduce
The code (it is already created in the link above):
- Add a Menu component
- Among its items, add a submenu with 4000 children
The user behaviour:
3. Move the mouse over the submenu
4. Move the mouse out of the submenu
What is expected?
The submenu should go away smoothly (without causing any visual artefacts) as it does in React 17.
https://codesandbox.io/s/antd-menu-react-17-antd-4-22-6-6p73ec?file=/index.js
What is actually happening?
There is a kind offlickering effect when the submenu goes away.
One can see it clearly when the submenu has a very large number of items. Butit also does happen with a small number of itemswhen the "CPU is overloaded or slow" (To test it in chrome: Developer Tools -> Tab: Performance Insight -> Set CPU throttling to 6x slowdown)
Environment | Info |
---|---|
antd | 4.22.6 |
React | 18.2.0 |
System | any |
Browser | Chrome 104.0.5112.101 |
1条答案
按热度按时间jgzswidk1#
Animated gifs with the behaviours
React 18 (issue)
React 17 (works fine)