Skip to content

Commit

Permalink
Issue #ED-718 fix: Fixed Subject is not displayed at top after select…
Browse files Browse the repository at this point in the history
…ing multiple filter
  • Loading branch information
Ajoymaity committed Jan 3, 2023
1 parent 6cfec2a commit b03445d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/category-list/category-list-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,17 @@ describe('CategoryListPage', () => {
"name": {
"order": "asc",
"preference": [
"accountancy",
"audience",
["subject 1", "subject 2"],
['accountancy'],
["subject 1", "subject 2"],
],
},
}]},
filterPillBy: null
}, type: 'Content'}],
supportedFacets: ["se_mediums", "subject", "primaryCategory", "audience"]
supportedFacets: ["se_mediums", "subject", "primaryCategory", "audience"],
totalCount: undefined
}
});
});
Expand Down
6 changes: 5 additions & 1 deletion src/app/category-list/category-list-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ export class CategoryListPage implements OnInit, OnDestroy {
});
if (this.formField.aggregate && this.formField.aggregate.groupSortBy && this.formField.aggregate.groupSortBy.length) {
this.formField.aggregate.groupSortBy.forEach((data) => {
data.name.preference = selectedData;
if (data.name && data.name.preference && data.name.preference.length) {
data.name.preference.push(selectedData);
} else {
data.name.preference = selectedData;
}
});
}
}
Expand Down

0 comments on commit b03445d

Please sign in to comment.