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.

Sorting not working when using templates

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
  • Current behavior I am using templates as my data is not flat and I am formatting the data a bit differently in each. So I am calling functions on the data from the template. Clicking on the table headings gives a random order
  • Expected behavior I expected the table to be sorted
  • Reproduction of the problem I made a plunkr here: http://plnkr.co/edit/abYiAm08Ibff9SixKoyG?p=preview
  • Table version: 0.9.3 (most recent)

Please try the plunkr to see the problem in action. Click the table headings and see what is happening. If I preprocess the data I might be able to get around this but doing the datepipe in the component seems to slow down the table massively. So this was the nicest way I found and I am happy with it except for the sorting.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
criticalpixelcommented, Oct 14, 2016

I tried to use the same data set you have there and I cannot sort even when not using templates. When I used flat data, it sorted it no problem. I think nested data isn’t sort-able right now 😦

0reactions
amcdnlcommented, Apr 15, 2017

The event is exposed now so you can trigger the sort.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gridview sorting not working with Item template - Stack Overflow
You have to use ToTable dataTable.DefaultView.Sort = e.SortExpression + " " + SortDir; gvwSacBus_Docs.DataSource = dataTable.DefaultView.
Read more >
Template Field GridView Sorting is not working - MSDN
I am trying to sort the gridview data using template field column. But it is not working. The Mark up code is like...
Read more >
datagrid sorting is not working ,when ng-template is used to ...
Hi. Datagrid is not allowing sorting,When ng-template is used to display columns data,My app code is. as below.
Read more >
Kendo Grid with Column Templates not sorting correctly - Telerik
The only way for sorting to work is to point the field at the value property - field: "attributes['contact.firstname'].value" - but then I...
Read more >
Help:Sorting - Wikipedia
It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus and vetting. Shortcuts · WP:SORT · WP:TABLESORT ......
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