diff --git a/src/components/categorical/categorical.css b/src/components/categorical/categorical.css new file mode 100644 index 00000000..e69de29b diff --git a/src/components/categorical/categorical.js b/src/components/categorical/categorical.js index 46242774..96dac589 100644 --- a/src/components/categorical/categorical.js +++ b/src/components/categorical/categorical.js @@ -6,48 +6,42 @@ import * as globals from "../../globals"; import styles from "./categorical.css"; import SectionHeader from "../framework/sectionHeader" import createCategoryCounts from "./createCategoryCounts"; -import { updateCategoricalQueryParams } from "../../util"; +import { alphabeticallySortedValues } from "../../util"; import cells from "../../../data/GBM_metadata.js"; -const Button = ({category, value, count, i}) => ( - -) - -const alphabeticallySortedValues = (values) => { - return Object.keys(values).sort((a, b) => { - var textA = a.toUpperCase(); - var textB = b.toUpperCase(); - return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; - }) +class Button extends React.Component { + render () { + return ( + + ) + } } -const Category = ({category, values}) => ( +const Category = ({category, values, handleClick}) => (
Sort by: Alphabetical / Count || Show counts: true / false || Collapse: all / none
{ _.map(createCategoryCounts(cells), (value, key) => { - return