-
Notifications
You must be signed in to change notification settings - Fork 57
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(endpoint): Add constructors for filter classes #3295
base: main
Are you sure you want to change the base?
Conversation
These were added to the Flow versions but not copied back to Hilla. They still are useful when you work with the filter classes yourself
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3295 +/- ##
=======================================
Coverage 86.89% 86.89%
=======================================
Files 115 115
Lines 8287 8287
Branches 1269 1269
=======================================
Hits 7201 7201
Misses 1072 1072
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This is to allow using a Hilla service from Flow as comboBox.setItemsPageable((pageable, filterString) -> productService.list(pageable, new PropertyStringFilter("name", Matcher.CONTAINS, filterString))); instead of comboBox.setItemsPageable((pageable, filterString) -> {
PropertyStringFilter filter = new PropertyStringFilter();
filter.setPropertyId("name");
filter.setMatcher(PropertyStringFilter.Matcher.CONTAINS);
filter.setFilterValue(filterString);
return productService.list(pageable, filter);
}); |
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 appreciate this small and nice feature, thanks! However, it needs some tests.
A unit test would be enough, I think. |
What should it test? |
Constructors invoked within the use case outlined above: #3295 (comment) |
Updated tests to use the constructors |
|
These were added to the Flow versions but not copied back to Hilla. They still are useful when you work with the filter classes yourself