The Wayback Machine - https://web.archive.org/web/20201003035446/https://github.com/adobe/react-spectrum/issues/1115
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ResizeObserver in ButtonGroup #1115

Open
LFDanLu opened this issue Sep 29, 2020 · 1 comment
Open

Use ResizeObserver in ButtonGroup #1115

LFDanLu opened this issue Sep 29, 2020 · 1 comment

Comments

@LFDanLu
Copy link
Collaborator

@LFDanLu LFDanLu commented Sep 29, 2020

馃檵 Feature Request

ButtonGroup currently uses the window resize event 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 that useResizeObserver exists (https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/utils/src/useResizeObserver.ts), we should use it in ButtonGroup and replace the window resize listeners.

馃Б Your Company/Team

RSP

@snowystinger
Copy link
Collaborator

@snowystinger snowystinger commented Sep 30, 2020

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
2 participants
You can鈥檛 perform that action at this time.