diff --git a/cycledash/static/js/examine/RecordStore.js b/cycledash/static/js/examine/RecordStore.js index 3ff7323..6958bc6 100644 --- a/cycledash/static/js/examine/RecordStore.js +++ b/cycledash/static/js/examine/RecordStore.js @@ -111,6 +111,10 @@ function createRecordStore(vcfId, dispatcher) { var query = queryFrom(range, filters, sortBys, page, limit); setSearchStringToQuery(query); + // If we're not just appending records, reset the selected records (as the + // table is now invalidated). + if (!append) selectedRecord = null; + $.when(deferredGenotypes(vcfId, query)) .done(response => { if (append) { diff --git a/cycledash/static/js/examine/components/BioDalliance.js b/cycledash/static/js/examine/components/BioDalliance.js index 7d65f19..6de0e2a 100644 --- a/cycledash/static/js/examine/components/BioDalliance.js +++ b/cycledash/static/js/examine/components/BioDalliance.js @@ -32,7 +32,6 @@ var BioDalliance = React.createClass({ tumorBaiChunks: CHUNKS_LOADING, }), render: function() { - console.log('PROPS:', this.props); var style = {}; if (!this.props.selectedRecord || this.state.normalBaiChunks == CHUNKS_LOADING || diff --git a/cycledash/static/js/examine/components/VCFTable.js b/cycledash/static/js/examine/components/VCFTable.js index 1f5d1c7..ff31448 100644 --- a/cycledash/static/js/examine/components/VCFTable.js +++ b/cycledash/static/js/examine/components/VCFTable.js @@ -249,7 +249,7 @@ var VCFTableBody = React.createClass({ + isSelected={selectedRecord === record} /> ); }); return ( @@ -292,12 +292,4 @@ var VCFRecord = React.createClass({ } }); -// Returns true if a, b are the same. Compares contig, position, ref & alt. -function sameRecord(a, b) { - var keys = ['contig', 'position', 'reference', 'alternates'], - a = _.pick(a, keys), - b = _.pick(b, keys); - return _.isEqual(a, b); -} - module.exports = VCFTable;