Fix bug that stopped apps from displaying

pull/10616/head
Will Piers 2016-12-05 16:54:11 -08:00
parent ae5faecba1
commit afd636d174
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import React, {PropTypes} from 'react'; import React, {PropTypes} from 'react';
import shallowCompare from 'react-addons-shallow-compare';
import {Link} from 'react-router'; import {Link} from 'react-router';
import _ from 'lodash'; import _ from 'lodash';
@ -140,12 +141,13 @@ const HostRow = React.createClass({
}, },
shouldComponentUpdate(nextProps) { shouldComponentUpdate(nextProps) {
return this.props.host !== nextProps.host; return shallowCompare(this, nextProps);
}, },
render() { render() {
const {host, source} = this.props; const {host, source} = this.props;
const {name, cpu, load, apps = []} = host; const {name, cpu, load, apps = []} = host;
return ( return (
<tr> <tr>
<td className="monotype"><Link to={`/sources/${source.id}/hosts/${name}`}>{name}</Link></td> <td className="monotype"><Link to={`/sources/${source.id}/hosts/${name}`}>{name}</Link></td>