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

Update MRT_FilterTextField.tsx #1260

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from

Conversation

NarenderDhamarlapally
Copy link

@NarenderDhamarlapally NarenderDhamarlapally commented Oct 7, 2024

https://github.com/user-attachments/assets/2c26f71d-1b8c-48e1-b0d5-6bc13749c9e6
empty string as a number,

type = "number"
muiFilterTextFieldProps: ({ column }) => {
return {
type: column?.columnDef?.meta?.type, // number
}

Warning: Received NaN for the value attribute. If this is expected, cast the value to a string.

when manualfilter is true

Plese check the codesandbox

empty string as a number
Copy link

vercel bot commented Oct 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
material-react-table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 5:46am
material-react-table-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 5:46am

if we convert to string to valueAsNumber then 
column.setfiltervalue is not taking direct 0 value
@NarenderDhamarlapally
Copy link
Author

This pull request includes a small but important change to the MRT_FilterTextField component in the packages/material-react-table package. The change ensures that the value is properly handled when the input type is number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant