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

[BUG] Issue with datatables.net when sorting array #9718

Open
DBlaisAsc opened this issue Jan 9, 2024 · 1 comment
Open

[BUG] Issue with datatables.net when sorting array #9718

DBlaisAsc opened this issue Jan 9, 2024 · 1 comment

Comments

@DBlaisAsc
Copy link

DBlaisAsc commented Jan 9, 2024

I'm using datatables.net feature, with ajax loading data/objects. Some properties that I'm loading are array of string. Datatables.net already handle this without issue and show all values.

But, when I click column header to sort on that column, I got that issue :

Uncaught TypeError: e.split is not a function
    at d.normalizeDiacritics (wet-boew.js:3742:15)
    at string-pre (wet-boew.js:14221:18)
    at ae (jquery.dataTables.min.js:4:44388)
    at Kt (jquery.dataTables.min.js:4:42064)
    at ut (jquery.dataTables.min.js:4:23510)
    at te (jquery.dataTables.min.js:4:43538)
    at jquery.dataTables.min.js:4:43708

The line is : chars = str.split( "" ),

The reason is str is an array of string, not an string.

Also, if the source is null, that function is also generating an issue. I fix that previous issue by adding that validation :

            wb.normalizeDiacritics = function (str) {
                if (str === null)  // Fix
                    return null;

Regards

@wewhite
Copy link
Contributor

wewhite commented Jan 10, 2024

What version of wet-boew are you using?

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

No branches or pull requests

2 participants