Overflow set renders incorrectly when there are no overflow items
Bug Report
- Package version(s): office-ui-fabric-react v2.25.0
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: Normal
Describe the issue:
There are a few bugs in overflow set when there are no overflow items. The problematic line of code is here:
{ overflowItems.length && onRenderOverflowButton(overflowButtonProps) }
First off, overflowItems is optional, so this causes an exception when overflowitems.length is undefined.
Second, when an empty array is passed in as overflowItems, the result of this logical expression is 0, which means a zero is rendered instead of nothing.
Actual behavior:
The number zero is rendered

Expected behavior:
No overflow menu is rendered
@micahgodbolt I'll work on a PR for this.
Yeah I came across this as well when working it into my resize group example. Should just test to see if it is defined, not length.
Thanks for stepping up to make a fix for this, @christiang88.