Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

num issues with filter? #252

Closed
chriddyp opened this issue Nov 23, 2018 · 5 comments
Closed

num issues with filter? #252

chriddyp opened this issue Nov 23, 2018 · 5 comments
Labels
dash-type-bug Something isn't working as intended

Comments

@chriddyp
Copy link
Member

I recently started using the new 'DataTable' function. I am trying to implement a simple conditional formatting applied to a column. My issue is with the 'style_data_conditional' under the 'filter': option. It looks like the num() function rounds to the nearest integer not allowing us to applied <> to decimal numbers in the column. Is this correct? Any help is very much appreciated.

Many thanks

Originally posted by @rbolado in #169 (comment)

@Marc-Andre-Rivet
Copy link
Contributor

No, you are correct to assume that this should work. It's currently parsed as an integer but the change is trivial (

return parseInt(value, 10);
)

@Marc-Andre-Rivet
Copy link
Contributor

#169

@Marc-Andre-Rivet Marc-Andre-Rivet added dash-type-bug Something isn't working as intended Attribute: Functionality labels Nov 26, 2018
@rbolado
Copy link

rbolado commented Nov 28, 2018

Hi Marc-Andre-Rivet,

Does this means that there is a typo in ( return parseInt(value, 10);) and now it will be fixed in the near future?

Many thanks,
Rufino

@pchalasani
Copy link

I've noticed this bug too and would like to see it fixed

@Marc-Andre-Rivet
Copy link
Contributor

The num and str cast do not exist anymore in dash-table>=4.0.0 (dash>=1.0.0). Casting is implicit when comparing values. Closing as moot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dash-type-bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

4 participants