gregnb / gregnb/mui-datatables

Custom Date Filter | Issue on removing filter

Open
#1,726 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

I have been trying to implement a custom date filter. I have been able to get some help from the age filter from within the examples and trying to implement 'to' and 'from' date in it and it works fine. However when I cancel or clear the filter, it makes another random pill and when I overcame the problem by several hours of debugging and adding the custom code, I was able to get rid of the pill but I am still stuck with another issue, which I have shown in the screenshot attached

![Capture](https://user-images.githubusercontent.com/16972277/118987319-996b1a00-b999-11eb-8a4b-810d63506b7f.PNG)
![Capture](https://user-images.githubusercontent.com/16972277/118987566-d0413000-b999-11eb-8b43-e2ac719007c4.PNG)
![Capture1](https://user-images.githubusercontent.com/16972277/118987573-d1725d00-b999-11eb-93cc-1739328c7500.PNG)
![Capture3](https://user-images.githubusercontent.com/16972277/118987576-d20af380-b999-11eb-8b8f-2853bd4dcc7d.PNG)

## Expected Behavior
When I clear the custom date filter everything should work as expected and I should be able to apply the filters again

## Current Behavior
When I clear the filter, it works, but when I reapply the filter it gives the error in the screenshot

## Steps to Reproduce (for bugs)

1. Apply custom date filter 'to' and 'from'
2. Remove the filter
3. Reapply the filter

## Your Environment
ReactJS
"@material-ui/core": "^4.11.0",
"mui-datatables": "^3.4.1",

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the custom date filter in ReactJS with @material-ui/core 4.11.0 and mui-datatables 3.4.1, following the listed apply, remove, and reapply steps. Done means clearing the filter leaves no extra pill and the filter can be applied again without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.