Remove findDOMNode as per warning

This commit is contained in:
Cmdr McDonald
2017-04-23 18:50:13 +01:00
parent 7db76ecba0
commit 4dc8ab928c
6 changed files with 11 additions and 29 deletions

View File

@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import * as ModuleUtils from '../shipyard/ModuleUtils';
import { findDOMNode } from 'react-dom';
import TranslatedComponent from './TranslatedComponent';
import { stopCtxPropagation } from '../utils/UtilityFunctions';
import cn from 'classnames';
@@ -374,7 +373,7 @@ export default class AvailableModulesMenu extends TranslatedComponent {
*/
componentDidMount() {
if (this.groupElem) { // Scroll to currently selected group
findDOMNode(this).scrollTop = this.groupElem.offsetTop;
this.node.scrollTop = this.groupElem.offsetTop;
}
}
@@ -393,7 +392,7 @@ export default class AvailableModulesMenu extends TranslatedComponent {
*/
render() {
return (
<div
<div ref={node => this.node = node}
className={cn('select', this.props.className)}
onScroll={this._hideDiff}
onClick={(e) => e.stopPropagation() }