Skip to content

Commit

Permalink
fix cohorts dropdown
Browse files Browse the repository at this point in the history
Signed-off-by: Ruby Zhu <zhenzhu@microsoft.com>
  • Loading branch information
RubyZ10 committed Aug 3, 2022
1 parent 5f1482d commit 1104862
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,7 @@ export class ChartConfigurationFlyout extends React.Component<
errorCohort.cohort.name !==
this.props.featureBasedCohorts[index].cohort.name
);
const selectedFeatureBasedCohortsChanged =
(prevProps.selectedFeatureBasedCohorts === undefined &&
this.props.selectedFeatureBasedCohorts !== undefined) ||
(prevProps.selectedFeatureBasedCohorts &&
this.props.selectedFeatureBasedCohorts &&
(this.props.selectedFeatureBasedCohorts.length !==
prevProps.selectedFeatureBasedCohorts.length ||
prevProps.selectedFeatureBasedCohorts.some(
(num, index) =>
num !== this.props.selectedFeatureBasedCohorts?.[index]
)));
if (featureBasedCohortsChanged || selectedFeatureBasedCohortsChanged) {
if (featureBasedCohortsChanged) {
newlySelectedFeatureBasedCohorts = this.props.featureBasedCohorts.map(
(_, index) => index
);
Expand Down

0 comments on commit 1104862

Please sign in to comment.