Provide a general summary of the issue here
I have a dynamic submenu that displays when the user has the corresponding permission.
When the network is fast, the dynamic submenu appears before any user interactions, and the RAC functions well.
20260411162632_rec_-convert.mp4
However, in poor network conditions, the dynamic submenu appears after other submenus, and it will not be triggered.
20260411163049_rec_-convert.mp4
🤔 Expected Behavior?
the dynamic submenu displays
😯 Current Behavior
the dynamic submenu is not triggered
💁 Possible Solution
No response
🔦 Context
import { useEffect , useState } from "react" ;
import {
Button ,
Menu ,
MenuItem ,
MenuTrigger ,
Popover ,
SubmenuTrigger ,
} from "react-aria-components" ;
export default function App ( ) {
return (
< MenuTrigger >
< Button > Menu</ Button >
< Popover >
< Menu >
< AuthSubMenu />
< SubMenu />
< MenuItem > Logout</ MenuItem >
</ Menu >
</ Popover >
</ MenuTrigger >
) ;
}
function SubMenu ( { label = "Submenu" } ) {
return (
< SubmenuTrigger >
< MenuItem > { label } </ MenuItem >
< Popover >
< Menu >
< MenuItem > Option 1</ MenuItem >
< MenuItem > Option 2</ MenuItem >
</ Menu >
</ Popover >
</ SubmenuTrigger >
) ;
}
function AuthSubMenu ( ) {
const [ isAuthed , setIsAuthed ] = useState ( false ) ;
useEffect ( ( ) => {
const timer = setTimeout ( ( ) => setIsAuthed ( true ) , 1500 ) ;
return ( ) => clearTimeout ( timer ) ;
} , [ ] ) ;
if ( ! isAuthed ) return false ;
return < SubMenu label = "Authed Submenu" /> ;
}
🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/flamboyant-worker-9vqw3v?file=%2Fsrc%2FApp.js%3A33%2C22
Version
react-aria-components@1.16.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
Provide a general summary of the issue here
I have a dynamic submenu that displays when the user has the corresponding permission.
When the network is fast, the dynamic submenu appears before any user interactions, and the RAC functions well.
20260411162632_rec_-convert.mp4
However, in poor network conditions, the dynamic submenu appears after other submenus, and it will not be triggered.
20260411163049_rec_-convert.mp4
🤔 Expected Behavior?
the dynamic submenu displays
😯 Current Behavior
the dynamic submenu is not triggered
💁 Possible Solution
No response
🔦 Context
🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/flamboyant-worker-9vqw3v?file=%2Fsrc%2FApp.js%3A33%2C22
Version
react-aria-components@1.16.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response