Comments (2)
If you're working with Dates, there's usually a lot more setup with filterFns and rounding off the dates that you have to do. Make sure you do that first before claiming that the filterFn doesn't work.
from material-react-table.
I understand there may have to be more work to do around rounding off the dates; but in the example provided in the documentation for filtering; shouldn't the Tanner Linsley
row with a hire date of 02/23/2016
show up when you filter between 02/23/2016
and 02/23/2016
inclusively?
In this case, would the approach be to remove the time from the dates before they're passed into the table since the date selection appears to be at a specific time rather than start of day and end of day?
Edit: After doing some more digging; I believe the issue is the fact that in the example we have an instance of a dayjs object for the filter value object but a Date object for the row value; if we run the equals
filterFn on the two values which is called from the betweenInclusive
filterFn, they'll return two different strings for the same date:
Example with Date: 02/23/2016
- Dayjs after running
.toString().toLowerCase().trim()
=tue, 23 feb 2016 05:00:00 gmt
- Date after running
.toString().toLowerCase().trim()
=tue feb 23 2016 00:00:00 gmt-0500 (eastern standard time)
If I change the accessorFn
to be of type Dayjs
this solves the issue since the string comparison will pass.
from material-react-table.
Related Issues (20)
- MRT Grid Infinite scrolling with RTk Query HOT 1
- Inability to Drag Columns on Tablets, Mobiles, or Touch Devices HOT 1
- MUI style breaking in UI HOT 1
- Column editSelectOptions array with label and value do not select label in edit mode HOT 1
- Strange Scrolling behaviour with Header Groups and column virtualization HOT 1
- muiPaginationProps does not include rowsPerPage HOT 2
- onColumnVisibilityChange behaves strange when clicked the show menu column showAll or hideAll button HOT 5
- When using `localStorage` or `sessionStorage` to store filter values, I'm encountering an error specifically with the `filterVariant` set to "date" or "date-range": HOT 5
- Column Ordering (DnD) not working on mobile device HOT 1
- Min, Max and Median functions not working properly on dataset with null values HOT 1
- sort on null value HOT 3
- Group columns are too small when enableColumnResizing:true
- Missing InputLabel when filter is a Select, variant is outlined, in custom filter ui
- Change the text of buttons in edit modal HOT 1
- When selecting "Empty" or "Not Emtpy" with multi-select results in TypeError: selected.map is not a function HOT 1
- how to access staticRowIndex inside AggregatedCell HOT 3
- pageCount:-1 does not seem to work as intended
- "enableRowVirtualization" doesn't work correctly with MRT_Table component HOT 1
- Global filter doesnt work on material react table with sub rows HOT 1
- enableClickToCopy only on normal cells and not on AggregatedCell HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-react-table.