OfficeDev/office-ui-fabric-core

Split button combined with Command button issue

saniok017 opened this issue · 1 comments

Split button rendering without styles in combination with Command button.

Codepen highlighting the issue:
https://codepen.io/saniok017/pen/yLNRpNV?editors=1010

If you remove the onClick from your example, it works.
I don't believe you're allowed to use the onClick property with the split property:
https://github.com/microsoft/fluentui/blob/master/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx#L53

If you track the getBaseButtonClassNames logic, the style does gets mutated if you use split: true, but the actual rendered content is determined by the _isSplitButton function. This function will return false if onClick is specified, thus, the expected sub-components are not rendered and so things won't look quite right.