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

How to use iCheck change checkbox style #5002

Closed
gerryge opened this issue Apr 27, 2020 · 7 comments
Closed

How to use iCheck change checkbox style #5002

gerryge opened this issue Apr 27, 2020 · 7 comments
Labels
awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days.

Comments

@gerryge
Copy link

gerryge commented Apr 27, 2020

I have followed the Issue #383 to change checkbox style wiht iCheck, but it doesn't work. I cannot click.
https://examples.bootstrap-table.com/index.html#issues/383.html

OS: Win10

var _option = $.extend({}, $.fn.dyTable.defaults, option || {});
        var target = $(this);

        _option.onPostBody = function () {
            $(':checkbox').each(function () {
                if (!$(this).parent().hasClass('check-box')) {
                    $(this).wrap('<label class="check-box"></label>')
                        .iCheck({
                        checkboxClass: 'icheckbox-blue',
                        radioClass: 'iradio-blue',
                        //increaseArea: '20%' // optional
                    });
                    //.radiocheck()
                }
            });
            //$('.dropdown-toggle').dropdown();
        }

        target.bootstrapTable(_option);

bt

Comment onPostBody event:
bt1

Can you give me some advice how to integrate with iCheck?

https://live.bootstrap-table.com/code/GerryGe/2657

@djhvscf
Copy link
Collaborator

djhvscf commented Apr 29, 2020

Did you review this example #3981?

@djhvscf djhvscf added the awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days. label Apr 29, 2020
@gerryge
Copy link
Author

gerryge commented Apr 29, 2020

Did you review this example #3981?

Yes, the answer is #383. I think the author recommends using onPostBody event to rewrite the checkbox. but this is not work for iCheck. Because iCheck wraps each input with div.
Who can give us a demo on how to integrate with iCheck?

By the way, the demo of #383 have the issue of toggle dropdown. You can try to find.@wenzhixin
https://live.bootstrap-table.com/code/GerryGe/2703

@gerryge
Copy link
Author

gerryge commented May 8, 2020

@djhvscf @wenzhixin
Can you help to fix the drop down cannot been opened of issue #383 ?
If you can provide a demo that integrates iCheck will be appreciated.

@UtechtDustin
Copy link
Collaborator

Why do you try to use a library which is some years old and dead ?

@gerryge
Copy link
Author

gerryge commented Jun 21, 2020

@UtechtDustin For some legacy projects.

@UtechtDustin
Copy link
Collaborator

I guess then its make more sense to use the default checkbox or use a lib which is not dead.
It dont make sense for us to support or add a feature of a not maintained lib.

What do you think @wenzhixin @djhvscf ?

@djhvscf
Copy link
Collaborator

djhvscf commented Jun 21, 2020

Yes. You could use the default checkbox. If this is not possible please follow this example https://github.com/wenzhixin/bootstrap-table-examples/blob/master/issues/383.html

@djhvscf djhvscf closed this as completed Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply Issues that are awaiting reply, will be closed if there is no any response in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants