-
Notifications
You must be signed in to change notification settings - Fork 25
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
Pass filter to minmax #1501
Pass filter to minmax #1501
Conversation
Quality Gate passedIssues Measures |
@@ -67,5 +67,22 @@ export async function filtersTest(mapview) { | |||
codi.assertEqual(minInput.value, '100', 'The min should return 100.'); | |||
codi.assertEqual(maxInput.value, '1000', 'The max should return 1000'); | |||
}); | |||
|
|||
await codi.it('Numeric Filter: layer.current specified as `lte: 200` and `gte: 800`', async () => { |
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.
Nice one! Thanks :)
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 added a test for the change. Looks good to me!
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.
Review in progress
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.
lgtm
Pass Filter to minmax
Description
I noticed that the default
field_minmax
query containsWHERE TRUE ${filter}
, however we never pass thefilter
as a parameter into the query.So the layer filter is never being used in this query.
This is a bug as we need to ensure the filtering occurs only on the data used on the layer itself, not on all data on the table on the database.
I have resolved this by simply adding it to the list of parameters passed to the query.
Type of Change
Please delete options that are not relevant, and select all options that apply.
Testing Checklist
Please delete options that are not relevant, and select all options that apply.
Code Quality Checklist
Please delete options that are not relevant, and select all options that apply.