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
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
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