Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧐[问题] 在ProTable 中的 valueType 是 select 支持 fieldNames 属性 #8671

Open
zhengchalei opened this issue Aug 24, 2024 · 2 comments

Comments

@zhengchalei
Copy link

提问前先看看:

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

🧐 问题描述

在 这种Tree 结构数据, 要修改fieldNames 有一点麻烦, 能不能支持一下 fieldNames

💻 示例代码

{
title: 'xx',
dataIndex: 'xx',
valueType: 'treeSelect',
// 支持fieldNames
request: async () => {
const {data} = await xx({specification: {}});
return data ?? [];
}
},

🚑 其他信息

@zhengchalei
Copy link
Author

期望值

    {
      title: 'xx',
      dataIndex: 'xx',
      valueType: 'treeSelect',
      fieldProps: {
        fieldNames: {
          title: 'name',
          key: 'id',
          children: 'children',
        }
      },
      request: async () => {
        const {data} = await xx({specification: {}});
        return data ?? [];
      }
    }

@chenJJ-88
Copy link

按理说因该是支持的吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants