-
Notifications
You must be signed in to change notification settings - Fork 270
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
Give option to list unselected cases in the Custom Selection component #2589
Conversation
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.
Please also solve type errors.
onClick(event: any) { | ||
let cases; | ||
let caseInverted; | ||
if(event.target.id == "selected") { |
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.
I would rather you pass the status as parameter into onClick function
this.content = cases.join("\n") | ||
} | ||
if(event.target.id == "unselected") { | ||
caseInverted = this.props.allSamples.map(sample => { |
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.
When you choose unselected
, it's the complement set of this.props.selectedSamples
in this.props.allSamples
onClick={this.onClick}> | ||
currently selected | ||
</span> | ||
<span id={"unselected"} |
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.
This option should be disabled when no case has been selected.
Signed-off-by: Hongxin Zhang <[email protected]>
update logic
if (selectMode === "selected") { | ||
selectedCases = this.props.selectedSamples; | ||
} else { | ||
const _selectedCaseIds = this.props.selectedSamples.map(sample => sample.sampleId); |
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.
Why not create a Map
instead of List
for looking if its present or not
This pr is closed due to long term our of sync. |
This solves cBioPortal/cbioportal#6361