MUIx数据网格显示对象的数组

问题描述 投票:0回答:1

我面临的问题是一种显示来自名为Question的对象数组的数据。 我正在使用渲染单元格来渲染行当前的数据,这是其中的片段:enter image description here return { field: item.dbCol, // I've a config file, which reads field name from a loop type: item.fieldType, width: item.columnWidth, renderCell: (params) => { return item.elements.map((element, iterator)=>{ switch (element.columnType) { case 'Question': return params.row.question.map((item)=><p>{item.answer}</p>); }

这是我到目前为止尝试的,但是我无法使用正确的列中获取问题对象的数据!

任何帮助都将不胜感激。
	
您可以尝试ValueGetter并迭代您的“问题”。它应该起作用 我需要相同的解决方案。我将准备此迭代部分并在此处进行更新。同时,您可以考虑是否有什么。 带有权限为标签的OR列表

tos yours

javascript reactjs material-ui datagrid mui-x-data-grid
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.