import React from 'react'; import { observer } from 'mobx-react'; import ReactSelect from 'react-select'; import SampleManager, { clinicalAttributeListForSamples, } from '../SampleManager'; import LabeledCheckbox from '../../../shared/components/labeledCheckbox/LabeledCheckbox'; import VAFChartWrapperStore from './VAFChartWrapperStore'; interface IVAFChartControlsProps { wrapperStore: VAFChartWrapperStore; sampleManager: SampleManager; } export const GROUP_BY_NONE = 'None'; const VAFChartControls: React.FunctionComponent = observer( function({ wrapperStore, sampleManager }) { const groupByOptions = [ { label: GROUP_BY_NONE, value: GROUP_BY_NONE, }, ...clinicalAttributeListForSamples(sampleManager.samples).map( item => ({ label: `${item.value}`, value: `${item.id}`, }) ), ]; function groupByValue() { let value = groupByOptions.find( opt => opt.value == wrapperStore.groupByOption ); return value ? { label: value.label, value: wrapperStore.groupByOption, } : ''; } return (
{!wrapperStore.isOnlySequentialModePossible && ( )}
); } ); export { VAFChartControls };