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

Customizable checkboxes and radio buttons #529

Closed
Suzanna-Manoj-Williams opened this issue Jun 23, 2016 · 11 comments
Closed

Customizable checkboxes and radio buttons #529

Suzanna-Manoj-Williams opened this issue Jun 23, 2016 · 11 comments

Comments

@Suzanna-Manoj-Williams
Copy link

Hi,
I would like to customize the checkboxes and radiobuttons with custom class names and styles. Is there a way possible?

@AllenFang
Copy link
Owner

@Suzanna-Manoj-Williams, sorry, we didnt support this feature, check #497, I will make these component more customizable in v3.0.0

@Suzanna-Manoj-Williams
Copy link
Author

Suzanna-Manoj-Williams commented Jun 24, 2016

It will be helpful if the checkbox can be a combination of input and label for the input, like below:
`



Check!!

` So we can customize only the checkbox with label and not others.

@AllenFang
Copy link
Owner

@Suzanna-Manoj-Williams surely.

@hawker000
Copy link

I've found this feature is implemented in v2.4.2.
See an example here.

@AllenFang
Copy link
Owner

haha, yes, This feature has been supported, thanks @hawker000 your remind

@wenom64
Copy link

wenom64 commented Jan 17, 2017

Hi,
it's possible add custom style for width (or change it) in lib\util.js@row63
30px is too narrow for custom checkboxes in my project.

if (isSelectRowDefined) {
  var style = {
    width: 30,
    minWidth: 30
  };
  if (!selectRow.hideSelectColumn) {
    selectRowHeader = _react2.default.createElement('col', { style: style, key: -1 });
  }
}

@AllenFang
Copy link
Owner

@wenom64, there's no any better solution, but you can use css to override it(There were someones did it)

@wenom64
Copy link

wenom64 commented Jan 20, 2017

Too bad.. I don't like !important, but do I have a choise?! 😄

My solution for now:
jsx

<BootstrapTable
  tableHeaderClass="table-custom-checkboxes"
  tableBodyClass="table-custom-checkboxes"
>

stylesheet

.table-custom-checkboxes > colgroup > col:first-child{
  width: 36px !important;
  min-width: 36px !important;
}

@AllenFang
Copy link
Owner

@wenom64, #979

@AllenFang
Copy link
Owner

@wenom64, released on v2.10.0, check example

@wenom64
Copy link

wenom64 commented Jan 27, 2017

Wow, U are the Best... I'm going to try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants