alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 361 forks source link

Sorting column with null freezes #251

Open croo opened 8 years ago

croo commented 8 years ago

Hi!

Column sorting fails when null value exists in a column. The console error: TypeError: bAttr is null

and the label "Processing..." is shown on the center of the table.

My dynatable setup:

$.dynatableSetup({
        features: {
            paginate: false,
            sort: true,
            pushState: false,
            search: false,
            recordCount: true,
            perPageSelect: false
        }
    });

cheers (awesome lib btw)

dnsBlah commented 8 years ago

please give a little mockup of your table. p.s. it's sorting: true, not sort: true

andrewrohde commented 7 years ago

The problem is the call toLowerCase on aAttr and bAttr where it's possible for either one to be null.
I've submitted a pull request that solves this issue. https://github.com/alfajango/jquery-dynatable/pull/267