Description
Provide a general summary of the issue here
By default, clicking a TreeItem
toggles its expansion state. However, when controlling the expansion manually using expandedKeys
and onExpandedChange
, the behavior changes.
After a page reload, it takes two clicks to toggle the expansion state of a TreeItem
. After this initial interaction, everything works as expected.
What's particularly strange is that I don’t need to click the same TreeItem
twice. I can click anywhere on the page first, then click the TreeItem
, and it will toggle as expected.
I have prepared a minimal reproducible example:
🤔 Expected Behavior?
- A single click should toggle the expanded state, even after a reload.
- The behavior with controlled expansion state via
expandedKeys
andonExpandedChange
should not be different from the uncontrolled version.
😯 Current Behavior
After a page reload, it takes two clicks to toggle the expansion state of a TreeItem
. After this initial interaction, everything works as expected.
What's particularly strange is that I don’t need to click the same TreeItem
twice. I can click anywhere on the page first, then click the TreeItem
, and it will toggle as expected.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
I have prepared a minimal reproducible example:
Version
react-aria-components 1.8.0
What browsers are you seeing the problem on?
Chrome, Firefox
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response