Skip to content

Commit

Permalink
Use ref instead of findDOMNode.
Browse files Browse the repository at this point in the history
  • Loading branch information
froatsnook authored Jan 30, 2017
1 parent d2a7c49 commit a6142ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/KendoWidgetMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var KendoWidgetMixin = function (widget) {
componentDidMount: function () {
if (this.props.debug) console.log('kendo widget mounting... ', widget);

this.elem = ReactDOM.findDOMNode(this);
this.elem = this.refs.elem;
this.$elem = $(this.elem);
this.$widget = mountKendoWidget(this, widget);

Expand Down Expand Up @@ -115,6 +115,7 @@ var KendoWidgetMixin = function (widget) {
*/
render: function () {
var other = _.omit(this.props, [ 'options', 'children', 'tag' ]);
other.ref = "elem";
return React.DOM[this.props.tag](other, this.props.children);
}
};
Expand Down

0 comments on commit a6142ec

Please sign in to comment.