Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit f03297d

Browse files
author
Evan Horne
committed
fix(filtermodel): adv filter all btn works now
1 parent 77d08c4 commit f03297d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Filter/FilterModels.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export function advFilterCategorySelect(
3535
): AdvancedFilterCategoryModel {
3636
const newCategory = { ...selectedCat };
3737
const options = newCategory.filterOptions.slice();
38-
const allPressed = option === undefined && newCategory.displayAllButton;
38+
const allPressed =
39+
option.filterType === undefined && newCategory.displayAllButton;
3940

4041
if (!newCategory.disabled) {
4142
if (allPressed) {
4243
options.forEach((opt: FilterOptionModel) => (opt.isSelected = false));
43-
}
44-
if (option) {
44+
} else if (option) {
4545
const optionIdx = options.indexOf(option);
4646
options[optionIdx].isSelected = !option.isSelected;
4747
if (!selectedCat.isMultiSelect) {

0 commit comments

Comments
 (0)