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(transfer): add source-filterable and target-filterable props #3428

Conversation

XieZongChen
Copy link
Collaborator

closes #3407

@vercel
Copy link

vercel bot commented Aug 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
naive-ui ✅ Ready (Inspect) Visit Preview Aug 10, 2022 at 2:37PM (UTC)

@codecov
Copy link

codecov bot commented Aug 4, 2022

Codecov Report

Merging #3428 (ea5ec8b) into main (3bdb1d8) will decrease coverage by 0.02%.
The diff coverage is 45.71%.

@@            Coverage Diff             @@
##             main    #3428      +/-   ##
==========================================
- Coverage   63.03%   63.00%   -0.03%     
==========================================
  Files        1056     1056              
  Lines       21877    21898      +21     
  Branches     5695     5698       +3     
==========================================
+ Hits        13790    13797       +7     
- Misses       6601     6614      +13     
- Partials     1486     1487       +1     
Impacted Files Coverage Δ
src/transfer/src/interface.ts 100.00% <ø> (ø)
src/transfer/src/Transfer.tsx 59.37% <30.00%> (-5.63%) ⬇️
src/transfer/src/use-transfer-data.ts 53.62% <52.00%> (-2.15%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@XieZongChen XieZongChen force-pushed the feat-NTransfer-add-targetFilterable-and-sourceFilterable branch from baaab46 to ea5ec8b Compare August 10, 2022 14:32
@codecov-commenter
Copy link

Codecov Report

Merging #3428 (14dba66) into main (3bdb1d8) will decrease coverage by 0.07%.
The diff coverage is 44.44%.

@@            Coverage Diff             @@
##             main    #3428      +/-   ##
==========================================
- Coverage   63.03%   62.95%   -0.08%     
==========================================
  Files        1056     1056              
  Lines       21877    21940      +63     
  Branches     5695     5721      +26     
==========================================
+ Hits        13790    13813      +23     
- Misses       6601     6634      +33     
- Partials     1486     1493       +7     
Impacted Files Coverage Δ
src/transfer/src/interface.ts 100.00% <ø> (ø)
src/transfer/src/Transfer.tsx 59.37% <30.00%> (-5.63%) ⬇️
src/transfer/src/use-transfer-data.ts 53.62% <50.00%> (-2.15%) ⬇️
src/grid/src/GridItem.tsx 80.00% <0.00%> (-16.00%) ⬇️
src/switch/src/Switch.tsx 64.03% <0.00%> (-3.93%) ⬇️
src/grid/src/Grid.tsx 76.27% <0.00%> (-2.68%) ⬇️
src/layout/src/Layout.tsx 57.62% <0.00%> (-1.00%) ⬇️
src/pagination/src/Pagination.tsx 53.01% <0.00%> (-0.46%) ⬇️
src/input/src/Input.tsx 58.41% <0.00%> (-0.46%) ⬇️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

}

function handleCheckedAll (): void {
doUpdateValue([...valueSetForSelectAllRef.value])
function handleUnCheckedAll (): void {
Copy link
Collaborator

Choose a reason for hiding this comment

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

uncheck 是一个单词

@07akioni 07akioni merged commit 3d17ef9 into tusen-ai:main Aug 18, 2022
return props.options.filter((opt) => filter(srcPatternRef.value, opt))
return targetOptionsRef.value.filter((opt) =>
filter(tgtPatternRef.value, opt, 'target')
)
})

const mergedValueSetRef = computed<Set<string | number>>(() => {
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
Collaborator

Choose a reason for hiding this comment

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

没看出来这么改有啥好处

@07akioni
Copy link
Collaborator

你原先那么写有问题,逻辑都散了,数据的逻辑不能散开

f444d93

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.

NTransfer 需要支持 target filter
3 participants