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

表格的rowSelection怎么去掉默认选项 #7295

Closed
iamhanson opened this issue Aug 23, 2017 · 7 comments
Closed

表格的rowSelection怎么去掉默认选项 #7295

iamhanson opened this issue Aug 23, 2017 · 7 comments
Assignees

Comments

@iamhanson
Copy link

iamhanson commented Aug 23, 2017

What problem does this feature solve?

给表格的复选框rowSelection添加自定义配置时,默认的全选当页和反选当页无法删除或者修改

What does the proposed API look like?

给表格的复选框rowSelection添加自定义配置时,默认的全选当页和反选当页可以去除或者修改

这个是使用ant实现的。

const rowSelection = { selectedRowKeys, selections: [{ key: "all-data", text: '所有', onSelect: (changableRowKeys) => { }, }], onChange: (selectedRowKeys, selectedRows) => { _this.setState({ selectedRowKeys, isAll: 0, selectedRows }); } };

e9fab7c4-0589-4b09-a2e8-fc24a59b2af1

这个是产品期望的逻辑,使用了selections之后,只增加了一个,但是默认的全选当页和反选当页无法去除或者修改,另外,key="all"和key="invert" 估计是这两个默认字段的key,因为新增的key如果是这两个,会无法显示出来。
qq20170823-143352 2x

@ant-design-bot
Copy link
Contributor

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: #4897

@yesmeck
Copy link
Member

yesmeck commented Aug 24, 2017

rowSelection.selections

@yesmeck yesmeck closed this as completed Aug 24, 2017
@afc163 afc163 reopened this Aug 24, 2017
@iamhanson
Copy link
Author

求大神解答

@afc163
Copy link
Member

afc163 commented Aug 25, 2017

目前的 API 貌似去不掉。

@iamhanson
Copy link
Author

@afc163 扎心了,多谢解答,只能用css硬上了,期待后续的版本调整

afc163 added a commit that referenced this issue Aug 25, 2017
afc163 added a commit that referenced this issue Aug 27, 2017
afc163 added a commit that referenced this issue Aug 27, 2017
afc163 added a commit that referenced this issue Aug 27, 2017
@afc163 afc163 closed this as completed Aug 27, 2017
@chafel
Copy link
Contributor

chafel commented Sep 27, 2017

👍 Thanks for quick response

@nowdothat
Copy link

now can success remove ?, I try trigger function, bug can't remove Class="ant-checkbox ant-checkbox-checked"

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

No branches or pull requests

6 participants