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

[TreeSelect] 自定义keys透传给treeProps #2892

Closed
langziyang opened this issue May 11, 2024 · 2 comments
Closed

[TreeSelect] 自定义keys透传给treeProps #2892

langziyang opened this issue May 11, 2024 · 2 comments
Labels
to be published fixed, not be published

Comments

@langziyang
Copy link

tdesign-react 版本

1.70

重现链接

No response

重现步骤

<Form.FormItem
                            name='area'
                            label='所在乡镇'
                            required
                            rules={[{required: true, message: '不能为空'}]}
                            labelAlign='top'
                            initialData='/api/areas/4'
                        >
                            <TreeSelect
                                data={areas}
                                keys={{value: '@id', label: 'name'}}
                                // treeProps={{keys:{value: '@id', label: 'name'}}} //如果不把keys透传给treeProps,那么默认会显示/api/areas/4而不是/api/areas/4所对应的label
                                onChange={value => {
                                    console.log(value)
                                }}
                            />
                        </Form.FormItem>

在使用TreeSelect时,如果自定义了keys,那么默认treeProps的keys也应该是自定义的keys,而不需要再传一次

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

👋 @langziyang,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn uyarn added the to be published fixed, not be published label May 13, 2024
@uyarn
Copy link
Collaborator

uyarn commented May 16, 2024

fixed 1.7.1

@uyarn uyarn closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

2 participants