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,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import cn from 'classnames';
import TranslatedComponent from './TranslatedComponent';
import PowerBands from './PowerBands';
@@ -149,7 +148,7 @@ export default class PowerManagement extends TranslatedComponent {
* Update power bands width from DOM
*/
_updateWidth() {
this.setState({ width: findDOMNode(this).offsetWidth });
this.setState({ width: this.node.offsetWidth });
}
/**
@@ -197,7 +196,7 @@ export default class PowerManagement extends TranslatedComponent {
let sortOrder = this._sortOrder;
return (
<div className='group half' id='componentPriority'>
<div ref={node => this.node = node} className='group half' id='componentPriority'>
<table style={{ width: '100%' }}>
<thead>
<tr className='main'>