mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[data-grid] Filter not working for float numbers

Open kh-mubashar opened this issue 5 years ago • 2 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

Currently in the Pro version the material Ui is working with numberic filters but if we try to pass float value i.e 41.965 the filter doesnt work properly and return no record image as we can see the record exists but as soon as we switch to equal sign to pin point the record the filter doesnt work image is there any additional config required for the float numbers

Expected behavior 🤔

the number type definition in GridColDef should cover all the numeric types float and int

Steps to reproduce 🕹

Steps:

  1. add filters option
  2. run filer on float time values 3. 4.

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Order ID 💳 (optional)

32896

kh-mubashar avatar Nov 23 '21 13:11 kh-mubashar

Could you provide a reproduction, I couldn't see the bug. This codesandbox.io template may be a good starting point.

The demo in https://mui.com/components/data-grid/demo/ has some columns with floating numbers (e.g. Unit Price). I tried to filter them using the equals operator and it worked.

m4theushw avatar Nov 24 '21 14:11 m4theushw

sorry found the issue its just if you define some of your one custom filter options your essentially overwriting some of them just have to change that and it fixed the issue. Thanks for the example that helped a lot

kh-mubashar avatar Nov 25 '21 11:11 kh-mubashar