By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.
https://stackblitz.com/edit/react-mbqgto-m7izxy?file=index.tsx,demo.tsx
鼠标hover已经收起的侧边栏菜单控制台会报警告。前提:1. menus 的items 只有一层,没有 children且菜单栏收起状态。具体看 demo.tsx 注释的代码 2. 加上 React.StrictMode
控制台没有 "Warning: findDOMNode is deprecated in StrictMode."
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Trigger which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node at li at InternalItem ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/Item.js:34:25 ) at InternalRawItem ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/RawItem.js:33:23 ) at LegacyMenuItem ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/MenuItem.js:44:34 ) at InternalMenuItem ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/MenuItem.js:71:21 ) at MenuItem ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/MenuItem.js:194:24 ) at Trigger ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/index.js:82:36 ) at Tooltip ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/Tooltip.js:21:32 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/tooltip/index.js:82:16 ) at MenuItem ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/menu/MenuItem.js:21:5 ) at ul at Overflow ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/Overflow.js:50:32 ) at InheritableContextProvider ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/context/MenuContext.js:31:23 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/Menu.js:55:27 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/menu/menu.js:33:26 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/menu/index.js:17:36 ) at div at aside at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/Sider.js:46:18 ) at section at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/layout.js:74:13 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/layout.js:39:17 ) at main at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/layout.js:58:7 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/layout.js:39:17 ) at section at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/layout.js:74:13 ) at eval ( https://react-mbqgto-m7izxy.stackblitz.io/turbo_modules/[email protected]/lib/layout/layout.js:39:17 ) at App ( https://react-mbqgto-m7izxy.stackblitz.io/~/demo.tsx:36:59 )
🤖 By issues-similarity-analysis