Skip to content
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

Closed
wants to merge 6 commits into from

Conversation

zhx828
Copy link
Member

@zhx828 zhx828 commented Aug 7, 2019

Copy link
Member Author

@zhx828 zhx828 left a 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") {
Copy link
Member Author

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 => {
Copy link
Member Author

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"}
Copy link
Member Author

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.

@jjgao jjgao temporarily deployed to cbioportal-frontend-pr-2589 August 8, 2019 21:16 Inactive
Hongxin Zhang and others added 2 commits August 9, 2019 16:08
Signed-off-by: Hongxin Zhang <[email protected]>
@jjgao jjgao temporarily deployed to cbioportal-frontend-pr-2589 August 9, 2019 20:11 Inactive
@zhx828 zhx828 marked this pull request as ready for review August 9, 2019 20:11
@zhx828 zhx828 requested a review from kalletlak August 9, 2019 20:11
if (selectMode === "selected") {
selectedCases = this.props.selectedSamples;
} else {
const _selectedCaseIds = this.props.selectedSamples.map(sample => sample.sampleId);
Copy link
Member

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

@zhx828
Copy link
Member Author

zhx828 commented Dec 16, 2019

This pr is closed due to long term our of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants