gregnb / gregnb/mui-datatables
Using Object instead of value in Row causes all filters to bug.
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
## Current Behavior
[Object Object]
## Steps to Reproduce (for bugs)
Hi, Instead of filling rows like this
rows = [{id: 10, lastName: 'test'}]
I'm doing
rows = [{id: {value: 10, color: "#fffff", lastName: {value: 'test', color: "#ffffff"}]
so I can access extra properties and use in my customBodyRender function.
But when doing that all other filters doesnt recognize anymore the value (ofc because i changed it to a object)
how can I fix that without re-writing all filters functions like the customOrder function.
## Your Environment
LATEST MUI VERSION AND LATEST REACT.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the two row shapes shown in the report, then trace how customBodyRender, filters, and customOrder consume row values. Compare the primitive-value and object-value cases and identify the expected value used by each operation. Done means filters and ordering recognize the underlying values while custom rendering can still access the extra properties.
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
- 35/100