We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 70ea11b + ec32198 commit 270b8f2Copy full SHA for 270b8f2
components/context-bar/link.jsx
@@ -43,6 +43,8 @@ const ContextBarLink = (props) => {
43
function handleClick (event) {
44
if (isFunction(onClick)) {
45
EventUtil.trap(event);
46
+
47
+ event.href = this.props.href;
48
onClick(event);
49
}
50
@@ -77,9 +79,9 @@ ContextBarLink.propTypes = {
77
79
*/
78
80
label: PropTypes.string,
81
/**
- * 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.
83
- onClick: PropTypes.string
84
+ onClick: PropTypes.func
85
};
86
87
module.exports = ContextBarLink;
0 commit comments