GEOLYTIX / xyz

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

Fix for Numeric Filter on field with no data #1216

Closed simon-leech closed 2 months ago

simon-leech commented 2 months ago

A numeric filter on a field that contains no data will currently fail. This is as the response from the template_max and template_min are undefined. image

This PR:

  1. checks for the response, removing the error,
  2. if no response is returned - returns text instead of a slider to tell the user of this. unnamed
  3. Fixes parseInt to Math.round as values of say 1001.99 would be rounded to 1001 not 1002 previously.

RobAndrewHurst commented 2 months ago

We will also want to document the filters module! :) @simon-leech Do you want me to give this a crack when you are finished?

simon-leech commented 2 months ago

@RobAndrewHurst Yes please - just fixing the SonarCloud now - then over to you! :)

sonarcloud[bot] commented 2 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