You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider case where my filterList is [1, 0, 2].
In update function of customFilterListOptions I should get index of removed value. When I remove chip with value 0 (index=1 in provided case), the filterPos should be 1.
Current Behavior
It works properly in almost all casses, but when removed chip/value is 0, filterPos is -1.
Expected Behavior
Consider case where my
filterList
is [1, 0, 2].In
update
function ofcustomFilterListOptions
I should get index of removed value. When I remove chip with value 0 (index=1 in provided case), thefilterPos
should be 1.Current Behavior
It works properly in almost all casses, but when removed chip/value is 0,
filterPos
is -1.Steps to Reproduce (for bugs)
codesandbox: https://codesandbox.io/s/custom-filter-chip-issue-3qtm2x?file=/src/index.tsx
step to reproduce:
User
chipAdmin
is removed instead.Your Environment
Additional Info
I found that this issue may be caused by this line
mui-datatables/src/components/TableFilterList.js
Line 63 in a382f3e
item[customFilterItemIndex]
of value 0 is consider as false and then[]
is passed.Then here
mui-datatables/src/MUIDataTable.js
Line 1372 in a382f3e
value could not be found and -1 is returned;
The text was updated successfully, but these errors were encountered: