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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const MRT_FilterTextField = <TData extends MRT_RowData>({
textFieldProps.type === 'date'
? event.target.valueAsDate
: textFieldProps.type === 'number'
? event.target.valueAsNumber
? isNaN(event.target.valueAsNumber) ? undefined : event.target.value
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this still return event.target.valueAsNumber when valid instead of just value?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The columnFilters are not functioning as expected when the value is a numeric 0,
while they work correctly when the value is the text '0'.

please check the CSB and Video

Copy link
Author

@NarenderDhamarlapally NarenderDhamarlapally Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working in ERP application user will check > 0 , >=0, <0,<=0.

Zero is not working when number input it is working as text input.

I want to work with number input.

please check Once

: event.target.value;
handleChange(newValue);
textFieldProps?.onChange?.(event);
Expand Down