Skip to content

Question: is there a way to disable select on a particular row or rows? #502

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

Closed
L5eoneill opened this issue Jun 10, 2016 · 5 comments
Closed

Comments

@L5eoneill
Copy link

We need select checkboxes for delete operations, but have a "default" item that cannot be deleted and wish to NOT show a checkbox for that row. Seems something that could be handy for other uses as well (user can only edit some rows depending on some value). Is there any current way to accomplish that?

@AllenFang
Copy link
Owner

AllenFang commented Jun 13, 2016

@L5eoneill, sorry for lately reply and react-bootstrap-table doesn't support this feature currently. I thinks it's a particular feature or requirement. BTW, I think this requirement is not very hard to implement, maybe you can try it. Feel free to ask me anything if have question.

Anyway, this inspire me an idea for supporting a unable select row. however, i thinks I can support it in near future, if it done, and you can hide the disable checkbox through css(I can give this disbled checkbox a classname). Maybe its a perfect workaround.

AllenFang added a commit that referenced this issue Jun 20, 2016
@AllenFang
Copy link
Owner

Supported on v2.3.6 and check example

@L5eoneill
Copy link
Author

Sweet! Excellent work, Allen. It works great (other than the "select all" checkbox will never indicate "all" are selected.)

By the way, to hide the disabled one, you'll need css saying input[type="checkbox"][disabled] { display: none;}

@AllenFang
Copy link
Owner

@L5eoneill, oh I forgot the select all, I'll patch it on next version. BTW, I think I just make the checkbox disabled, I dont want to hide it. Anyway, it's a customizable case for user. I'm planing to make the ckeckbox columns more customizable in v3.0.0. ckeck #497
Thanks.

@AllenFang
Copy link
Owner

@L5eoneill, the select all bug has been fixed on v2.3.7.

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

2 participants