You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the official React documentation, when I click on the dropdown button (▾) for a topic in the sidebar, it expands as expected. However, clicking on the same dropdown again does not collapse the section.
It only collapses when I click on another topic’s dropdown, which is inconsistent behavior and confusing from a UX perspective.
Hii, sharp insight. Allow me to resolve this issue just by altering state of a variable using react hook useState. Could you please authorize my access to the repository?
In the official React documentation, when I click on the dropdown button (▾) for a topic in the sidebar, it expands as expected. However, clicking on the same dropdown again does not collapse the section.
It only collapses when I click on another topic’s dropdown, which is inconsistent behavior and confusing from a UX perspective.
React version: 19.1
Steps To Reproduce
Go to the React documentation.
Click on any dropdown (e.g., "Learn React" or "API Reference") in the left sidebar to expand it.
Click again on the same dropdown.
Observe that the dropdown does not collapse.
Click on a different dropdown.
Observe that the previous one collapses.
Link to code example: https://react.dev/reference/react/hooks
The current behavior
Clicking on the same dropdown icon does not collapse the section.
The only way to collapse a section is to open a different section.
The expected behavior
Clicking on the same dropdown icon should toggle (expand/collapse) the section.
This behavior is expected and more intuitive for users.
The text was updated successfully, but these errors were encountered: