GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
87 stars 25 forks source link

Filter Min = 0 Fix #1302

Closed simon-leech closed 3 months ago

simon-leech commented 3 months ago

Filter Min Fix

Description

I have added a new filter_minmax query that returns an array of both min and max values. This removed some of the complexity in the generateMinMax function as you no longer need to pass in a string of "min" or "max".

I have added a new filter.minmax array that gets set to [filter.min, filter.max] initially. The benefit of this is that by extracting the query response from the filter.min and filter.max values, we separate providing a specific min or max in the configuration vs getting them from the database.

I have resolved the issue with clear and reload of the filter, it will now update the filter values using the query. I have added a new message that displays when the min and max are identical. image

GitHub Issue

Type of Change

Please delete options that are not relevant, and select all options that apply.

How have you tested this?

Ran this using a field that contained 0 as the minimum field value.

Testing Checklist

Code Quality Checklist

simon-leech commented 3 months ago

I have added a new filter_minmax query that returns an array of both min and max values. This removed some of the complexity in the generateMinMax function as you no longer need to pass in a string of "min" or "max".

I have added a new filter.minmax array that gets set to [filter.min, filter.max] initially. The benefit of this is that by extracting the query response from the filter.min and filter.max values, we separate providing a specific min or max in the configuration vs getting them from the database.

I have resolved the issue with clear and reload of the filter, it will now update the filter values using the query. I have added a new message that displays when the min and max are identical. image

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud