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

feat: data-table on-update:checked-row-keys add rowData #2265

Closed
wants to merge 2 commits into from

Conversation

Talljack
Copy link
Contributor

close #2215

@vercel
Copy link

vercel bot commented Jan 25, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/6iKrcB7wzkA67Uxbpri8y7e7AgYx
✅ Preview: https://naive-ui-git-fork-talljack-2215-tusimple.vercel.app

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #2265 (5e00e7c) into main (f6bf6b5) will decrease coverage by 0.03%.
The diff coverage is 23.80%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
src/data-table/src/interface.ts 100.00% <ø> (ø)
src/data-table/src/utils.ts 69.35% <16.66%> (-5.65%) ⬇️
src/data-table/src/use-check.ts 67.60% <26.66%> (-4.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6bf6b5...5e00e7c. Read the comment docs.

@@ -143,7 +165,8 @@ export function useCheck (
{
cascade: true
}
).checkedKeys
).checkedKeys,
[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这有问题,需要判断是不是 uncheck 整颗树。

整个过程最好再整一个中间函数,来转换一下 checkedKeys 到行数据。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

而不是在具体的功能函数解决这个问题

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接通过rowKeysToUncheck去获取到checkedKeys然后在获取rowData也可以吧

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看你想写几遍了,肯定是写一遍最好

@lanxxg
Copy link

lanxxg commented Jun 3, 2022

请问什么时候更新

@07akioni 07akioni closed this in 0a7181a Jun 19, 2022
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

Successfully merging this pull request may close these issues.

数据表格的复选框勾选怎么只能获取的设定的key,不能获取当前选中的数据?
3 participants