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] 可编辑行的表格校验规则回调期望添加行信息,以便联动校验 #2726

Open
DevQiao opened this issue Jan 25, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@DevQiao
Copy link

DevQiao commented Jan 25, 2024

这个功能解决了什么问题

场景:可编辑表格某一 column 的校验逻辑依赖于另一个 column 的值, 在 column.edit.rules 配置自定义 validator 时,callback 只接受当前 cell 的值,无法获取当前行,故无法做当前行数据的联动校验
1706148285274

你建议的方案是什么

在自定义 validator 的 callback 传入当前 row 的数据
eg:

rules: [{ validator: (val, rowData) => val.length && rowData.orderType === 'xxx' > 0, message: 'xxxxxx' }],
Copy link
Contributor

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

Copy link
Contributor

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

@HaixingOoO HaixingOoO added the enhancement New feature or request label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants