Skip to content

Commit

Permalink
feat(ToastContainer): add support for optionsOverride.handleOnClick
Browse files Browse the repository at this point in the history
* So react component actions can be dispatched
* Closes #43
* Original author: @ssmlee04
* Original commit: e50c55c
  • Loading branch information
shihminlee-ami authored and tomchentw committed Dec 10, 2015
1 parent 16aa43f commit 73dc376
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ToastContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ module.exports = React.createClass({
toastId,
key,
ref: `toasts__${ key }`,
handleOnClick: this._handle_toast_on_click,
handleOnClick: (e) => {
if ("function" === typeof optionsOverride.handleOnClick) {
optionsOverride.handleOnClick();
}
return this._handle_toast_on_click(e);
},
handleRemove: this._handle_toast_remove,
},
});
Expand Down

0 comments on commit 73dc376

Please sign in to comment.