Skip to content

Commit

Permalink
optionally disable clickable cells on table
Browse files Browse the repository at this point in the history
  • Loading branch information
chgibb committed Sep 18, 2019
1 parent 3a1be9b commit 80de6dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/req/renderer/containers/tables/alignmentsReportTable.tsx
Expand Up @@ -5,7 +5,6 @@ import {AlignData} from "../../../alignData";
import {Table} from "../../components/table";
import {sweepToBottom} from "../../styles/sweepToBottom";
import {Fasta} from "../../../fasta";
import {AtomicOperationIPC} from "../../../atomicOperationsIPC";
import {TableCellHover} from "../tableCellHover";
import {Search} from "../../components/icons/search";

Expand All @@ -17,6 +16,7 @@ export interface AlignmentsReportTableProps
fastas?: Array<Fasta>;
onRowClick : (event: React.MouseEvent | undefined, rowData: AlignData | undefined) => void;
viewMore : (rowData : AlignData) => void;
clickableCells: boolean;
toolTipText : string;
}

Expand Down Expand Up @@ -75,7 +75,7 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
title: "Alias",
render: (row: AlignData) =>
{
return (<div id={AlignmentsReportTable.aliasCellId(row)} className={TableCellHover.cellHoverClass}>{row.alias}</div>);
return (<div id={AlignmentsReportTable.aliasCellId(row)} className={this.props.clickableCells ? TableCellHover.cellHoverClass : ""}>{row.alias}</div>);
},
searchable : true,
field : "alias",
Expand Down Expand Up @@ -187,7 +187,7 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
cellStyle: sweepToBottom as any,
render: (row: AlignData) =>
{
return row.varScanSNPSummary ? (<div id={AlignmentsReportTable.SNPCellId(row)} className={TableCellHover.cellHoverClass}>{row.varScanSNPSummary.SNPsReported}</div>) : "Unknown";
return row.varScanSNPSummary ? (<div id={AlignmentsReportTable.SNPCellId(row)} className={this.props.clickableCells ? TableCellHover.cellHoverClass : ""}>{row.varScanSNPSummary.SNPsReported}</div>) : "Unknown";
},
searchable : true,
field : "",
Expand All @@ -207,7 +207,7 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
title: "BLAST Runs",
render: (row: AlignData) =>
{
return row.BLASTSegmentResults ? (<div id={AlignmentsReportTable.BLASTRunsCellId(row)} className={TableCellHover.cellHoverClass}>{row.BLASTSegmentResults.length}</div>) : 0;
return row.BLASTSegmentResults ? (<div id={AlignmentsReportTable.BLASTRunsCellId(row)} className={this.props.clickableCells ? TableCellHover.cellHoverClass : ""}>{row.BLASTSegmentResults.length}</div>) : 0;
},
searchable : true,
field : "",
Expand Down
Expand Up @@ -49,6 +49,7 @@ export class CoverageTrackOverlay extends React.Component<CoverageTrackOverlayPr
selectedAlignUuid : rowData.uuid
});
}}
clickableCells={false}
toolTipText="View Coverage Tracks For This Alignment"
aligns={this.props.aligns.filter((x) =>
{
Expand Down
1 change: 1 addition & 0 deletions src/req/renderer/views/outputView/outputView.tsx
Expand Up @@ -154,6 +154,7 @@ export class OutputView extends React.Component<OutputViewProps,OutputViewState>
clickedRow : rowData
});
}}
clickableCells={true}
toolTipText="View More"
aligns={this.props.aligns}
fastas={this.props.fastas}
Expand Down

0 comments on commit 80de6dc

Please sign in to comment.