question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

null values break Datatable sorting

See original GitHub issue

[Vue warn]: Error in render function: “TypeError: Cannot read property ‘toLocaleLowerCase’ of null”

Edit:

I’m sorry. I was on a deadline and just left the barebones to the issue here to come back later. There is actually not much more to it, but here’s a codepen:

https://codepen.io/keystorm/pen/OjLQYP

If the null value was on the first column, the table wouldn’t render at all. If it’s not the first column, sorting won’t work as it seems to try to null.toLocaleLowerCase()

Boilerplate

Versions

Vue 2.4.2 Vuetify 0.14.5 Chrome 59, OS X 10.11

What is expected ?

null values provided as data in columns should not cause render or runtime error when fed to a DataTable.

What is actually happening ?

DataTable won’t render if null is found on first column. DataTable won’t sort any column if null is present.

Reproduction Link

https://codepen.io/keystorm/pen/OjLQYP

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
keystormcommented, Jul 24, 2017

@johnleider Could you reopen this issue so it can get the proper visibility? Maybe someone else has encountered this and has something to add to it.

Thanks.

0reactions
lock[bot]commented, Apr 16, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

Read more comments on GitHub >

github_iconTop Results From Across the Web

jquery datatables sorting neglect null value - Stack Overflow
I'm using datatables and jQuery for making nice sortable tables. I now want to sort the rows an a value. This value is...
Read more >
Sorting dates, handling null values — DataTables forums
Null dates are currently treated as being equal to "1/1/1970", which leads to non-intuitive behavior when sorting a list which contains ...
Read more >
How Null value are sorted in datatable.select(filter,sort) - MSDN
I believe records are sorted properly if they contain NULL values. So you should expect that NULL values will be first in a...
Read more >
Package 'data.table' - R Project
NULL represents all rows more efficiently than creating a vector such as 1:nrow(x). j. Column name(s) (character) or number(s) (integer) to be ...
Read more >
Feature Request: Specify ordering of null values for column
I tried implementing this with a custom sort function, but noticed that null values are handled by BeanPropertyComparator before the sort ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found