Skip to content

Rendering performance issue on big number (600+) of checkboxes. #101

@merqlove

Description

@merqlove

Hello Artur,
Thanks for your plugin. Try to add this into your module for lazy loading.
It is very useful, when you working with big number of checkboxes.
In addition you can store el.parent() in local var, because it's used 4 times.

Plugin.prototype = {

    init: function ( options ) {

        ...
        if(el.parent().hasClass('has-pretty-child')) {
            addCheckableEvents(el.parent());
            return;
        }
        ...

After this update i can preload styles :)

.clearfix.prettycheckbox.labelright.blue.has-pretty-child
  %input.pretty.hidden{'data-id' => factor_h[:id], name: 'link[]', type: 'checkbox', value: factor_v[:id]}
  %a{href: '#', class: linked_checkbox?(factor_h, factor_v[:id])}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions