gregnb / gregnb/mui-datatables

Deleting custom filter manually displays empty chips

Open
#1,216 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

## Expected Behavior
Removing the filter from the filter dialog should not display any chips

## Current Behavior
Removing the filter from the filter dialog shows empty chips

## Steps to Reproduce (for bugs)
https://codesandbox.io/s/muidatatables-custom-toolbar-jk556

1. Opening filter dialog (top right)
2. Deleting the age filters by using Backspace key

## Possible workaround
If I return an empty array within the render function of customFilterListOptions as the fallback, it works as expected.
Don't know if this was intended or not.

| Tech | Version |
|--------------|---------|
| Material-UI | 3.2.2 |
| MUI-datatables | 2.14.0 |
| React | 16.4.0 |

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the empty-chip behavior in the linked CodeSandbox, then trace the customFilterListOptions entry point used by the custom toolbar. Done when deleting the age filters no longer renders empty chips, matching the stated expected behavior and workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.