Skip to content

Commit

Permalink
Merge pull request #4644 from alisman/fxCustom
Browse files Browse the repository at this point in the history
Fix custom sample list selection
  • Loading branch information
alisman authored Jun 19, 2023
2 parents 0ef9111 + c85e24a commit 08449d9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/shared/components/query/QueryStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,14 @@ export class QueryStore {
@observable private _selectedSampleListId?: string = undefined; // user selection
@computed
public get selectedSampleListId() {
const matchesSelectedStudy = this.sampleListInSelectedStudies.result.some(
sampleList => sampleList.sampleListId === this._selectedSampleListId
);
// check to make sure selected sample list belongs to study
// OR is custom list
const matchesSelectedStudy =
this._selectedSampleListId === CUSTOM_CASE_LIST_ID ||
this.sampleListInSelectedStudies.result.some(
sampleList =>
sampleList.sampleListId === this._selectedSampleListId
);
return matchesSelectedStudy
? this._selectedSampleListId
: this.defaultSelectedSampleListId;
Expand Down

0 comments on commit 08449d9

Please sign in to comment.