Skip to content

Commit

Permalink
Merge pull request #2897 from kalletlak/fix-6552
Browse files Browse the repository at this point in the history
Plots tab: make mutation search case insensitive
  • Loading branch information
kalletlak committed Nov 25, 2019
2 parents f701e42 + e220954 commit d7301c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/resultsView/plots/PlotsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1627,9 +1627,9 @@ export default class PlotsTab extends React.Component<IPlotsTabProps,{}> {
};
}

private fDatumHasMutation = (d:any, mutation:string) => {
const mutationFound = !!mutation && !!d.mutations.find((m:any)=>!!(m.proteinChange && (m.proteinChange.indexOf(mutation) > -1)));
return mutationFound;
private fDatumHasMutation = (d: IPlotSampleData, word: string) => {
const searchWordRegex = new RegExp(word, 'i');
return !!word && !!d.mutations.find((m) => !!(m.proteinChange && searchWordRegex.test(m.proteinChange)));
}

@computed get showMutationNotFoundMessage():boolean {
Expand Down

0 comments on commit d7301c4

Please sign in to comment.