-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: data-table on-update:checked-row-keys add rowData #2265
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tusimple/naive-ui/6iKrcB7wzkA67Uxbpri8y7e7AgYx |
Codecov Report
@@ Coverage Diff @@
## main #2265 +/- ##
==========================================
- Coverage 64.22% 64.19% -0.04%
==========================================
Files 936 936
Lines 18656 18671 +15
Branches 4550 4552 +2
==========================================
+ Hits 11982 11986 +4
- Misses 5779 5790 +11
Partials 895 895
Continue to review full report at Codecov.
|
src/data-table/src/use-check.ts
Outdated
@@ -143,7 +165,8 @@ export function useCheck ( | |||
{ | |||
cascade: true | |||
} | |||
).checkedKeys | |||
).checkedKeys, | |||
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这有问题,需要判断是不是 uncheck 整颗树。
整个过程最好再整一个中间函数,来转换一下 checkedKeys 到行数据。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
而不是在具体的功能函数解决这个问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接通过rowKeysToUncheck去获取到checkedKeys然后在获取rowData也可以吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看你想写几遍了,肯定是写一遍最好
请问什么时候更新 |
close #2215