Open victorct-tradeengage opened 3 weeks ago
This actually applies the same with booleans
Confirmed @victorct-tradeengage ... @cherniavskii could this be related to the recent changes for the localStorage issue?
@michelengelen I think it also applies to dates, will double check today
This happens with dates too, internally we are converting those string values into the other types (using valueParser
property in colDef) before applying the filter operator to them.
@cherniavskii @romgrk should we use that valueParser
more at the top level ? and update the value types in the filter model, then we also don't need to parse the values internally again.
happy to send PR for that
We should use the parser when it makes sense, probably in the input component change handler. Feel free to send a PR for this.
Steps to reproduce
Link to live example: link
Steps:
filterModel
, usingonFilterModelChange
filterModel
is a string, not a number or a boolean.Current behavior
Numbers and booleans are being returned as strings when filtering a DataGrid
Expected behavior
Numbers and booleans must be returned as numbers or booleans when filtering a DataGrid
Context
No response
Your environment
- System: - OS: macOS 14.0 - Binaries: - Node: 19.5.0 - ~/.local/share/nvm/v19.5.0/bin/node - npm: 9.3.1 - ~/.local/share/nvm/v19.5.0/bin/npm - pnpm: Not Found - Browsers: - Chrome: 127.0.6533.120 - Edge: Not Found - Safari: 17.0 - npmPackages: - @emotion/react: 11.11.1 - @emotion/styled: 11.11.0 - @mui/base: 5.0.0-beta.40 - @mui/core-downloads-tracker: 5.15.15 - @mui/icons-material: ^5.14.11 => 5.14.11 - @mui/lab: ^5.0.0-alpha.148 => 5.0.0-alpha.150 - @mui/material: ^5.14.11 => 5.15.15 - @mui/private-theming: 5.15.14 - @mui/styled-engine: 5.15.14 - @mui/system: 5.15.15 - @mui/types: 7.2.14 - @mui/utils: 5.15.14 - @mui/x-data-grid: 7.3.1 - @mui/x-data-grid-generator: ^7.3.1 => 7.3.1 - @mui/x-data-grid-premium: ^7.6.1 => 7.6.1 - @mui/x-data-grid-pro: 7.3.1 - @mui/x-date-pickers: ^6.17.0 => 6.17.0 - @mui/x-license: ^7.2.0 => 7.2.0 - @mui/x-tree-view: 6.0.0-alpha.1 - @types/react: ^18.0.14 => 18.0.14 - react: ^18.2.0 => 18.2.0 - react-dom: ^18.2.0 => 18.2.0 - typescript: ^4.7.4 => 4.7.4npx @mui/envinfo
Search keywords: number, filter, string, DataGird Order ID: I have a license key for the premium, not can share the email if needed, not sure how to get the OrderID