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

Fix unwrap error in individual feature importance #1897

Merged
merged 5 commits into from
Jan 12, 2023

Conversation

hawestra
Copy link
Contributor

Description

Use all data cohort as the default selected cohort if the currently selected cohort was deleted while the individual feature importance was using it. This bug was caused by React lifecycle events; the render function is using this.state.selectedCohortIndex on render but when the selected cohort gets deleted, this.props.cohorts is updated causing a re-render but this.state.selectedCohortIndex isn't updated until componentDidUpdate causing an out of index error.

Checklist

  • I have added screenshots above for all UI changes.
  • I have added e2e tests for all UI changes.
  • Documentation was updated if it was needed.

1 similar comment
Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing!

@hawestra hawestra merged commit d1e449a into main Jan 12, 2023
@hawestra hawestra deleted the hawestra/robotPageUnwrapFix branch January 12, 2023 19:02
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.

6 participants