Describe the bug
Adding any element to renderValues.stickyButtons in onRenderTabSet causes an infinite Maximum update depth exceeded React error when the tab strip width is near a certain boundary.
Function checkForOverflow in useTabOverflow uses a hardcoded 10px offset as hysteresis to prevent oscillation between docked/undocked states, but if sticky buttons is wider than 10px that cause infinite loop of button appearance and disappearance.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Create function that contains
renderValues.stickyButtons.push(<div>HELLO</div>)
- Pass it to layout as onRenderTabSet
- Scale your tabset column until tab seratator comes close to "HELLO"
- Experience a crash
Expected behavior
Sticky buttons width is measured instead of being hardcoded
Operating System
Doesn't matter
Browser Type?
Chrom
Browser Version
any
Screenshots or Videos
Can't produce, because of NDA
Additional context
Changing offset value from 10 to value bigger than sticky buttons width fixes that
Describe the bug
Adding any element to renderValues.stickyButtons in onRenderTabSet causes an infinite Maximum update depth exceeded React error when the tab strip width is near a certain boundary.
Function checkForOverflow in useTabOverflow uses a hardcoded 10px offset as hysteresis to prevent oscillation between docked/undocked states, but if sticky buttons is wider than 10px that cause infinite loop of button appearance and disappearance.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
renderValues.stickyButtons.push(<div>HELLO</div>)Expected behavior
Sticky buttons width is measured instead of being hardcoded
Operating System
Doesn't matter
Browser Type?
Chrom
Browser Version
any
Screenshots or Videos
Can't produce, because of NDA
Additional context
Changing offset value from 10 to value bigger than sticky buttons width fixes that