pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🧐[问题] BetaSchemaForm 的 FormList 里, columns上的方法中如何获得list的下标

Open def-wang opened this issue 1 year ago • 1 comments

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🧐 问题描述

BetaSchemaForm 的 FormList 里, columns上的方法中如何获得list的下标

💻 示例代码

      
const valueEnum = {
  all: { text: '全部', status: 'Default' },
  open: {
    text: '未解决',
    status: 'Error',
  },
  closed: {
    text: '已解决',
    status: 'Success',
    disabled: true,
  },
  processing: {
    text: '解决中',
    status: 'Processing',
  },
};
const columns = [
  {
    dataIndex: 'list',
    valueType: 'formList',
    fieldProps: {
      creatorRecord: {
        status: 'open',
      },
    },
    columns: [
      {
        dataIndex: 'status',
        valueType: 'select',
        initialValue: 'open',
        fieldProps: {
          allowClear: false,
          onSelect: onSelect,
        },
        title: '状态',
        valueEnum: valueEnum
      },
    ],
  },
]

上面 onSelect 回调函数中如何获取到 list 的下标

🚑 其他信息

def-wang avatar Jan 30 '24 09:01 def-wang

以下的 Issues 可能会帮助到你 / The following issues may help you

  • [#8017][🧐[问题]BetaSchemaForm 的 FormList 里, columns上的方法中如何获得list的下标, 类似table的rowkey][84%]

github-actions[bot] avatar Jan 30 '24 09:01 github-actions[bot]