Skip to content

Commit

Permalink
Initialize filters from cc design, not result.
Browse files Browse the repository at this point in the history
Fixes #2619.
  • Loading branch information
chrisknoll committed Oct 25, 2021
1 parent 55e1826 commit d9c97c3
Showing 1 changed file with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,27 +392,16 @@ define([
}

getFilterList(data) {
const cohorts = lodash.uniqBy(
lodash.flatten(
lodash.flatten(
data.map(a => a.cohorts.map(c => ({label: c.cohortName, value: parseInt(c.cohortId)})))
)
),
'value'
);

const cohorts = this.design().cohorts.map(c => ({label: c.name, value: parseInt(c.id)}));
const domains = lodash.uniqBy(
lodash.flatten(
data.map(a => a.domainIds.map(d => ({label: this.findDomainById(d).name, value: d})))
),
this.design().featureAnalyses.map(fa => ({label: this.findDomainById(fa.domain).name, value: fa.domain})),
"value"
);

const analyses = lodash.uniqBy(
data.filter(a => a.analysisId).map(a => ({label: a.rawAnalysisName, value: a.analysisId})),
this.design().featureAnalyses.map(fa => ({label: fa.name, value: fa.id})),
"value"
);

);
return [
{
type: 'multiselect',
Expand Down

0 comments on commit d9c97c3

Please sign in to comment.