Skip to content

在嵌套数据的情况下BasicTable加载可编辑组件无法显示字段 #8080

@liangchaofan

Description

@liangchaofan
版本号:

3.7.3

问题描述:

下面是数据源[
{
"raceId": 1900448793901084673,
"playStatus": {
"JJ_ZC_BQC": "2",
}}]

下面是代码
const columns: BasicColumn[] = [

{
  title: '让球',
  dataIndex: 'playStatus.JJ_ZC_BQC', 
  width: 100,
  edit: true,
  customRender: ({ record }) => record.playStatus.JJ_ZC_BQC ?? '-', // 处理可能的undefined
  editComponent: 'InputNumber',
  editComponentProps: {
    min: -10,
    max: 10,
    step: 1,
  },
},]

如上数据,我要加载playStatus.JJ_ZC_BQC到显示到表格,在我不设置 edit: true,属性的时候能正常显示数据,一设置 edit: true, 就不能显示字段内容(直接显示的空白), 不加载嵌套数据(例如:raceId)的情况是正常的,设置不设置edit属性都正常显示,

错误截图:

友情提示:

  • 未按格式要求发帖、描述过于简单的,会被直接删掉;
  • 描述问题请图文并茂,方便我们理解并快速定位问题;
  • 如果使用的不是master,请说明你使用的分支;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions