-
Notifications
You must be signed in to change notification settings - Fork 38
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ButtonGroup
overflow logic is running w/o overflowButton
prop
#1923
Comments
Thanks for submitting this issue. I can confirm that I am able to reproduce it using the steps that you have provided. I would like to add that the elements in the HTMLCollection are the 1 and 2 buttons, and the 3 button is missing, along with the overflow button. @mayank99 Do you know of a way that we could avoid this re-render? |
Fixed in 3.7.2 |
@Ben-Pusey-Bentley Do you know if this would fix #1118? |
Did some testing with the linked stackblitz, and this change does not seem to have fixed that issue. |
#1118 is technically unrelated, and can be worked around by not using |
Describe the bug (current behavior)
ButtonGroup
will re-render multiple times based on visible nodes returned by theuseOverflow
even whenoverflowButton
prop is not provided. This complicates a use-case where a custom overflow logic is needed.Expected Behavior
ButtonGroup
should always render provided children as is whenoverflowButton
is not specified.Link to minimal repro
https://stackblitz.com/edit/github-fywssb?file=src%2FApp.tsx
Steps To Reproduce
Calculate overflow
(simulates conditional rendering of overflow button)Anything else?
Final render is fine due to later re-renders.
The text was updated successfully, but these errors were encountered: