-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add search filter criteria for authorized and unauthorized studies #4825
base: master
Are you sure you want to change the base?
add search filter criteria for authorized and unauthorized studies #4825
Conversation
✅ Deploy Preview for cbioportalfrontend ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -1511,6 +1511,16 @@ export class QueryStore { | |||
return new Set(referenceGenomes); | |||
} | |||
|
|||
@computed get readPermissions(): Set<string> { | |||
const studies = Array.from(this.treeData.map_node_meta.keys()).filter( | |||
s => typeof (s as CancerStudy).readPermission !== 'undefined' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(s:CancerStudy)=>s.readPermission===undefined
should work. You don't need typeof anymore. Possible that you will need to cast with as, but not sure.
s => typeof (s as CancerStudy).readPermission !== 'undefined' | ||
); | ||
const readPermissions = studies.map(n => | ||
(n as CancerStudy).readPermission.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(n:CancerStudy)=>readPermission
(probably already a string?)
@@ -129,7 +129,7 @@ export class ListPhrase implements Phrase { | |||
for (const fieldName of this.fields) { | |||
let anyPhraseMatch = false; | |||
const fieldValue = study[fieldName]; | |||
if (fieldValue) { | |||
if (typeof fieldValue !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fieldValue===undefined
function matchPhraseFull(phrase: string, fullText: string) { | ||
return fullText.toLowerCase() === phrase.toLowerCase(); | ||
function matchPhraseFull(phrase: string, toMatch: boolean | string | number) { | ||
return _.toString(toMatch).toLowerCase() === phrase.toLowerCase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably don'tneed to use _ (lodash here). just toMatch.toString().toLowerCase()
{} | ||
> { | ||
constructor(props: { ids: String[] }) { | ||
super(props); | ||
this.state = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we try to use mobx state instead of react state. for consistency. just put it as an observable property on the component
|
||
<div | ||
style={{ | ||
width: '100%', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably don't need width:100%
Fix cBioPortal/icebox#468
add search filter criteria for authorized and unauthorized studies
Checks
Any screenshots or GIFs?
If this is a new visual feature please add a before/after screenshot or gif
here with e.g. Giphy CAPTURE or Peek
Notify reviewers
Read our Pull request merging
policy. It can help to figure out who worked on the
file before you. Please use
git blame <filename>
to determine thatand notify them either through slack or by assigning them as a reviewer on the PR