gregnb / gregnb/mui-datatables

Cant search data with children having array of objects

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

Description

this is my sample data
![sample code](https://github.com/gregnb/mui-datatables/assets/69955065/dc49b224-f156-46c4-895c-7db7fc5b65cc)

Are we able to filter objects as of recent like how this does it import MaterialTable from "@material-table/core";

ever since i started using this component import MUIDataTable from "mui-datatables";
my life has become misearable yet i thought its an advancement of @material-table/core

first and foremost that row data of this mui-datatables in ` customBodyRender: (value, tableMeta) => {
console.log("🚀 ~ ListPage ~ tableMeta:", tableMeta);
// const tableRowData = { ...(tableMeta.rowData ?? []) };`

there returns wiredly it returns as an array instead of object since my initial table data is array of objects
and also
i cant pass in data with children which are array of objects
` {
name: "vendor",
label: "Vendor",
options: {
filter: true,
sort: true,
customBodyRender: (value) => {
const vendor = value.name;
return

{vendor ? vendor : "No Vendor"}
;
}
}
},`

that seems as a work around but its also wrong cos serach cant work at the end of the day so more advancements need to be done i request that the development team copies how this works MaterialTable from "@material-table/core";

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported nested child-array data and the customBodyRender configuration, then inspect how rowData and filtering handle those values. Done means the issue's object-shaped row data and child objects can be displayed and searched as requested, with behavior verified against the sample data.

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.