Description
Provide a general summary of the issue here
A bit of an undocumented feature that doesn't seem to work completely as intended. Select and ComboBox both keep the button in the pressed state if the popover is in an open state:
https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/src/Select.tsx#L170
In the render props, this doesn't work and the isOpen render prop from the Select / ComboBox must be used
However, the data attributes on the Button do reflect the persisted pressed state. This inconsistency in state representation is undesirable
🤔 Expected Behavior?
It would be nice to isolate render functions as much as possible and not have them wrapped around so much of the children components. So, it would be desirable to be able to use the isPressed render prop from the Button to change icons based on state
😯 Current Behavior
IsPressed render prop from Button corresponds to user interaction and is not overridden by state provided by Select/Combobox as seems to be intended
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Version
RAC @ 1.3.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac & Windows
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response