Skip to content

Commit 41a94d5

Browse files
authored
advance filter bug fix (#242)
#238 iTwin/changed-elements#121 previous fix missed the condition on change being both property & indirect --------- Co-authored-by: naronchen <naronchen@users.noreply.github.com>
1 parent 27caa06 commit 41a94d5

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.changeset/many-flies-warn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@itwin/changed-elements-react": patch
3+
---
4+
5+
fix on advance filter

packages/changed-elements-react/src/widgets/EnhancedElementsInspector.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,15 +1028,16 @@ export class ChangedElementsListComponent extends Component<ChangedElementsListP
10281028
return true;
10291029
}
10301030

1031-
// Type of change filtering matches, and we have no properties to check, so entry matches filter
1032-
if ((entry.type & (TypeOfChange.Property | TypeOfChange.Indirect)) === 0) {
1031+
// keep the entry if user has typeOfChange filtering other than properties & indrect checked and matches
1032+
if (
1033+
(entry.type &
1034+
options.wantedTypeOfChange &
1035+
~(TypeOfChange.Property | TypeOfChange.Indirect)
1036+
) !== 0
1037+
) {
10331038
return true;
10341039
}
10351040

1036-
// keep the entry if user has typeOfChange filtering other than properties checked and matches
1037-
if (((entry.type & ~TypeOfChange.Property) & (options.wantedTypeOfChange)) !== 0) {
1038-
return true;
1039-
}
10401041

10411042
// Only thing left to do is to check that the entry's properties are visible in filters
10421043
return this._anyEntryPropertiesVisible(entry, options);

0 commit comments

Comments
 (0)