Skip to content

onItemClick not invoked on split buttons #10453

@briunsilo

Description

@briunsilo

In the SplitButton example, a generic onClick is used, which is not that useful unless you can get a reference to the item clicked.
https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/Button/examples/Button.Split.Example.tsx

Replacing the generic onClick with specific onItemClick handlers seems obvious, but they do not seem to get invoked when clicking the items?

const menuProps: IContextualMenuProps = {
items: [
{
key: 'emailMessage',
text: 'Email message',
iconProps: { iconName: 'Mail' },
onItemClick: function() {
console.log('clicked!')
}
}
]
};

<DefaultButton
text="Standard"
split
menuProps={menuProps}
/>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions