Skip to content

Commit

Permalink
fix(ToastMessage): use ReactDOM.findDOMNode instead of this.getDOMNode
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Oct 29, 2015
1 parent 071c891 commit d4f40b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ToastMessage/animationMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module.exports = {
_clear_animation(hide) {
var animations = this._get_animation_classes(hide);
animations.forEach((animation) => {
CSSCore.removeClass(this.getDOMNode(), animation);
CSSCore.removeClass(ReactDOM.findDOMNode(this), animation);
});
},

Expand All @@ -135,7 +135,7 @@ module.exports = {
_flush_class_name_queue() {
if (this.isMounted()) {
this.classNameQueue.forEach(
CSSCore.addClass.bind(CSSCore, this.getDOMNode())
CSSCore.addClass.bind(CSSCore, ReactDOM.findDOMNode(this))
);
}
this.classNameQueue.length = 0;
Expand Down
6 changes: 5 additions & 1 deletion src/ToastMessage/jQueryMixin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
"use strict";

import {
default as ReactDOM,
} from "react-dom";

function call_show_method ($node, props) {
$node[props.showMethod]({
duration: props.showDuration,
Expand Down Expand Up @@ -77,7 +81,7 @@ module.exports = {

_get_$_node () {
/* eslint-disable no-undef */
return jQuery(this.getDOMNode());
return jQuery(ReactDOM.findDOMNode(this));
/* eslint-enable no-undef */
},

Expand Down

0 comments on commit d4f40b3

Please sign in to comment.