import React from 'react'; import ShowMore from '../show-more'; export default class NodeDetailsInfo extends React.Component { constructor(props, context) { super(props, context); this.state = { expanded: false }; this.handleClickMore = this.handleClickMore.bind(this); } handleClickMore() { const expanded = !this.state.expanded; this.setState({expanded}); } render() { let rows = (this.props.rows || []); const prime = rows.filter(row => row.priority < 10); let notShown = 0; if (!this.state.expanded && prime.length < rows.length) { notShown = rows.length - prime.length; rows = prime; } return (