Skip to content
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

Data is hidden when initialising a range_number_slider on a fully data empty column #455

Closed
karlbibby opened this issue Apr 3, 2018 · 3 comments
Labels

Comments

@karlbibby
Copy link

As the min and max return as Infinity and -Infinity all data is hidden.

To resolve this I updated the two functions below now the slider inits and shows the data and the slider just shows a 0.

findMinInArray

            var min = Math.min.apply(Math, narray);
            if (!isFinite(min)) {
                min = 0;
            }
            return min;

findMaxInArray

            var max = Math.max.apply(Math, narray);
            if (!isFinite(max)) {
                max = 0;
            }
            return max;
@vedmack
Copy link
Owner

vedmack commented Apr 4, 2018

please provide a test case jsfiddle /etc

@karlbibby
Copy link
Author

use case example : the data is returned from a database and the number field is optional so may be fully empty.

https://jsfiddle.net/karlbibby/95mozgd9/5/

@vedmack vedmack added the bug label Apr 24, 2018
vedmack added a commit that referenced this issue Apr 26, 2018
fixed / improved a bit
#455
#461
@vedmack
Copy link
Owner

vedmack commented Apr 26, 2018

fixed in 0.9.3.beta.20 (improved it a bit by doing ceil / floor to max / min values

@vedmack vedmack closed this as completed Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants