lundi 2 janvier 2017

TreeList Checkbox Performance

I have a TreeView with a 200+ rows.

When i click on the checkbox, it take about 1 sec to perform the check.

When i click on the header checkbox, it freeze the browser.

here is the code i used when the header checkbox change:

function toggleAll(e) {
        setTimeout(function() {
                const view = dataSource.view();
                const checked = e.target.checked;

                //$(`input[data-name=${e.target.dataset.name}]`).prop('checked', checked);
                for (let i = 0; i < view.length; i++) {
                    view[i].set(e.target.dataset.name, checked);
                }
            },
            0);
    }

This is jsfiddle url




Aucun commentaire:

Enregistrer un commentaire