Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse ResizeObserver in ButtonGroup #1115
Open
Labels
Comments
|
one thing to note, whomever works on this, is that inline-flex may cause an issue because the container for the button group won't try to fill the available space like a block level element |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


ButtonGroup currently uses the window
resizeevent to figure out whether or not it should switch from horizontal to vertical orientation when there isn't enough room to render all of its buttons (https://github.com/adobe/react-spectrum/blame/main/packages/%40react-spectrum/buttongroup/src/ButtonGroup.tsx#L69-L79). Now thatuseResizeObserverexists (https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/utils/src/useResizeObserver.ts), we should use it in ButtonGroup and replace the windowresizelisteners.RSP