From 936f9ccb6d02d25f5b23919198204de4bbac916f Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Mon, 23 Oct 2017 14:10:44 -0700 Subject: [PATCH] import new file --- src/components/categorical/categorical.js | 47 +---------------------- 1 file changed, 2 insertions(+), 45 deletions(-) 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 ( -