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)
- Translations into Ukrainian language HOT 8
- Custom filter popover text
- Header Group visibility is always true
- Pinning hidden columns with column virtualization causes error
- Show / hide all buttons don't update header group visibility state
- When using `enableRowVirtualization`, the layout of `filterVariant: 'datetime-range',` behaves improperly
- [UX] Pinning columns to the right pushes item to the bottom of menu
- Table Footer gets cut off in narrow scenarios
- Really strange issue HOT 7
- Localisation of filters does not apply to the filter menu HOT 1
- Show/hide filter triggers onColumnFiltersChange for backend pagination HOT 4
- "Show filter" triggers onColumnFiltersChange for backend pagination
- Mantine Filter Search Does Not Work Correctly and Highlight Words When Turkish Characters Are Used with Capslock On. HOT 2
- Virtualization is not working properly even on the documentation page! HOT 5
- Sticky Pinned Columns Misplacement in Material React Table for RTL Language
- Localization props doesn't work with proxy object HOT 4
- since 2.5.0: 'top' positionPagination clashes with globalFilters in css HOT 1
- Hiding columns raises - Maximum update depth exceeded HOT 5
- Column Actions and selector going to last on dynamic columns even with defined columnOrder HOT 1
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.