-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Property filter token groups #74
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
=======================================
Coverage 99.16% 99.17%
=======================================
Files 13 13
Lines 478 482 +4
Branches 168 170 +2
=======================================
+ Hits 474 478 +4
Misses 4 4 ☔ View full report in Codecov by Sentry. |
ab0bdc9
to
e991757
Compare
src/operations/property-filter.ts
Outdated
return result; | ||
return evaluate({ | ||
operation: query.operation, | ||
tokens: query.tokenGroups ?? query.tokens.map(token => ({ operation: 'and', tokens: [token] })), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the operation always and
but not token.operation
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question. The query.tokens has type Token[] so no operation there. As the tokens list is always a single token the operation is irrelevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this transformation as unneeded as the evaluate function takes either token groups or tokens
e991757
to
789cc7b
Compare
Added support for token groups in property filter.
Property filter PR: cloudscape-design/components#2626
Rel: [qUFhApKfmWEg]
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.