简体   繁体   English

MUI DataGrid ColumnDef:该行在列定义的 valueOptions 道具上不可用

[英]MUI DataGrid ColumnDef: the row is not available on the valueOptions prop of the column definition

I am using a DataGridPro component with different columns.我正在使用具有不同列的 DataGridPro 组件。 One one the columns is defined like this:一列的定义如下:

在此处输入图像描述

This issue is that I am trying to understand why the row is not available in the valueOptions prop of the column definition.这个问题是我试图理解为什么该行在列定义的 valueOptions 道具中不可用。 I would like to be able to populate the choices based on a list that is available on the row in another field.我希望能够根据另一个字段中行上可用的列表来填充选项。 But I get this error when I try to read the row:但是当我尝试读取该行时出现此错误:

在此处输入图像描述

Can you please help?你能帮忙吗? The grid is populated with lots of rows coming from an api fetch.网格中填充了许多来自 api 提取的行。 Every other column is working fine accept this one.其他每一列都工作正常接受这一列。

Thank you.谢谢你。

I discovered that it was my bad.我发现这是我的错。 My column object was used twice with different parameters and so, yes, the row was not available for the second case.我的列 object 用不同的参数使用了两次,所以,是的,该行在第二种情况下不可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM