import React, { Component } from 'react'; import { Radio } from 'react-bootstrap'; import { observer } from 'mobx-react'; export interface IGeneFilterSelection { currentSelection: GeneFilterOption; onOptionChanged?: (currentSelection: GeneFilterOption) => void; } export enum GeneFilterOption { ANY_SAMPLE = 'anySample', ALL_SAMPLES = 'allSamples', } @observer export default class GeneFilterMenu extends React.Component< IGeneFilterSelection, {} > { constructor(props: IGeneFilterSelection) { super(props); } private handleOptionChange(e: React.FormEvent) { if (this.props.onOptionChanged) { const target = e.target as HTMLInputElement; this.props.onOptionChanged(target.value as GeneFilterOption); } } render() { return (
Different gene panels were used for the samples.
Filter mutations for:
) => this.handleOptionChange(e) } > Genes profiled in any sample ) => this.handleOptionChange(e) } > Genes profiled in all samples
); } }