Skip to content

Commit ec32198

Browse files
author
David Brainer-Banker
committed
Update ContextBar link to new event standard
1 parent 8271679 commit ec32198

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/context-bar/link.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ const ContextBarLink = (props) => {
4343
function handleClick (event) {
4444
if (isFunction(onClick)) {
4545
EventUtil.trap(event);
46-
onClick(event, { href: this.props.href });
46+
47+
event.href = this.props.href;
48+
onClick(event);
4749
}
4850
}
4951

@@ -77,7 +79,7 @@ ContextBarLink.propTypes = {
7779
*/
7880
label: PropTypes.string,
7981
/**
80-
* Function triggered when link is clicked. If set, `href` will be ignored.
82+
* `function (event)` - fires when the link is clicked. If set, `href` will be ignored, but includes the `href` of the link in the event object.
8183
*/
8284
onClick: PropTypes.func
8385
};

0 commit comments

Comments
 (0)