diff --git a/src/components/categorical/categorical.js b/src/components/categorical/categorical.js index fd979227..1fdc964a 100644 --- a/src/components/categorical/categorical.js +++ b/src/components/categorical/categorical.js @@ -6,52 +6,9 @@ import * as globals from "../../globals"; import styles from "./categorical.css"; import SectionHeader from "../framework/sectionHeader" import createCategoryCounts from "./createCategoryCounts"; +import Value from "./value"; import { alphabeticallySortedValues } from "./util"; -@connect((state) => { - return { - selectedMetadata: state.selectedMetadata - } -}) -class Button extends React.Component { - render () { - - /* has this value for this category already been selected? */ - let selected = false; - let fontWeight; - - if (!this.props.selectedMetadata) { /* there is no selected metadata */ - selected = false; - } else if ( - this.props.selectedMetadata[this.props.metadataField] && /* the key {Location: []} is present */ - this.props.selectedMetadata[this.props.metadataField].indexOf(this.props.value) > -1 /* "Tumor" exists in {Location: ["Tumor"]} */ - ) { - selected = true; - } - - return ( -
-
- {this.props.value} -
- - {this.props.count} - -
- ) - } -} - const Category = ({metadataField, values, toggleOn, toggleOff}) => (
( { _.map(alphabeticallySortedValues(values), (v, i) => { return ( -