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

[Table] 编辑功能的 edit 配置期望增加 api 获取行数据 #995

Closed
fangxiezhen opened this issue Jun 28, 2022 · 8 comments
Closed
Labels
to be published fixed, not be published

Comments

@fangxiezhen
Copy link

这个功能解决了什么问题

期望能在 edit 配置中增加获取该行数据的渠道
使用场景例如:行有两个 select 框,后者框的选项依赖于前者的选择项,但是现有的 api,无法在 edit 配置中获取到该行,所以无法进行判断

你建议的方案是什么

可以把 edit 配置由 object,兼容增加出 (context)=> edit 。
或者有更好的方式来帮助实现单元格之间的联动效果。
期待回复

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

♥️ 有劳 @yunfeic @tengcaifeng @Yacent @basecss 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @fangxiezhen

@chaishi
Copy link
Collaborator

chaishi commented Jun 28, 2022

现有的 api,无法在 edit 配置中获取到该行,所以无法进行判断

截图中,不是有每次变化的行数据 和 rowIndex 么。是否尝试过

image

@chaishi
Copy link
Collaborator

chaishi commented Jun 28, 2022

需求整体描述有点抽象,看不太明白,不知如何支持

@fangxiezhen
Copy link
Author

需求整体描述有点抽象,看不太明白,不知如何支持

例如,
image
而这两个 select 的 options 都是通过 edit 配置的 props 传入的,现有的 api 的情况下,我该如何灵活控制 props 传入的 options 呢?

@chaishi
Copy link
Collaborator

chaishi commented Jul 2, 2022

resolved in #1028

事件 onEdited 参数已经包含当前 行的全部数据,即 newData,如下图所示。因此,不再新增获取行数据的 API。
image

@chaishi
Copy link
Collaborator

chaishi commented Jul 2, 2022

对于需求中提到的,Select 组件之间的联动,在 #1028 中已支持,待发布。

示例代码,如下:

image

@honkinglin
Copy link
Collaborator

0.36.2 fixed

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

3 participants