import _ from 'lodash'; import { observer } from 'mobx-react'; import * as React from 'react'; import { Table } from 'react-bootstrap'; import { Collapse } from 'react-collapse'; import { ITranscript } from './TranscriptSummaryTable'; import './TranscriptSummaryTable.module.scss'; interface ITranscriptTableProps { canonicalTranscript: ITranscript; otherTranscripts?: ITranscript[]; isOpen: boolean; allValidTranscripts: string[]; onTranscriptSelect(transcriptId: string): void; } @observer class TranscriptTable extends React.Component { public render() { if (_.isEmpty(this.props.otherTranscripts)) { return (
# Transcript Hugo Gene Symbol Hgvs Short Ref Seq Variant Classification Hgvsc Consequence Terms Exon
1 { this.props.canonicalTranscript .transcript } { this.props.canonicalTranscript .hugoGeneSymbol } { this.props.canonicalTranscript .hgvsShort } {this.props.canonicalTranscript.refSeq} { this.props.canonicalTranscript .variantClassification } {this.props.canonicalTranscript.hgvsc} { this.props.canonicalTranscript .consequenceTerms } {this.props.canonicalTranscript.exon}
); } else { const allTranscripts = _.concat( this.props.canonicalTranscript, this.props.otherTranscripts! ); return (
{allTranscripts.map((transcript, index) => { return ( {this.props.allValidTranscripts.includes( transcript.transcript! ) ? ( ) : ( )} ); })}
# Transcript Hugo Gene Symbol Hgvs Short Ref Seq Variant Classification Hgvsc Consequence Terms Exon
{index + 1}
{transcript.transcript}
{transcript.transcript}{transcript.hugoGeneSymbol} {transcript.hgvsShort} {transcript.refSeq} { transcript.variantClassification } {transcript.hgvsc} {transcript.consequenceTerms} {transcript.exon}
); } } } export default TranscriptTable;