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

ant-transfer checkall button should only control searhed items not all item list (search mode) #5993

Closed
wangtao0101 opened this issue May 2, 2017 · 6 comments
Assignees

Comments

@wangtao0101
Copy link
Contributor

Version

2.9.3

Environment

ant 2.9.3

Reproduction link

https://ant.design/components/transfer-cn/#components-transfer-demo-advanced

Steps to reproduce

chose 1 item
input some letter (do not search the chosed item)
click checkall button
click checkall button

What is expected?

the item chosen before should be chosen

What is actually happening?

no item is chosen


const holder = checkAll ? [] : filteredDataSource.map(item => item.key);
I think [] should include the items not showed in search mode

@benjycui
Copy link
Contributor

benjycui commented May 3, 2017

I don't think that we can find the right behavior. You can control the behavior with selectedKeys

@afc163 afc163 self-assigned this May 3, 2017
@wangtao0101
Copy link
Contributor Author

用中文:))
I don't think that we can find the right behavior. 这个没错。
但是这个checkall按钮的行为是不一致的,这个有问题的
例如:搜索模式下 全选会选中当前搜索的条目,但是反选却反选了整个list,行为上至少要一致吧?

@benjycui
Copy link
Contributor

benjycui commented May 3, 2017

搜索模式下 全选会选中当前搜索的条目,但是反选却反选了整个list,行为上至少要一致吧?

按我的理解,全选和反选,只要做到 WYSIWYG 就可以了,至于那些没展示出来的数据,是否该被选中或者反选,由业务代码决定。

@benjycui
Copy link
Contributor

benjycui commented May 3, 2017

Table 也是如此。

@afc163 afc163 closed this as completed in c8d9e64 May 3, 2017
@afc163
Copy link
Member

afc163 commented May 3, 2017

Make sure selection only affect filtered items.

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants