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 template let-column="column" used

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

When <template let-column="column"> tag is added to an expressive template, sorting function for that column doesn’t work.

Expected behavior

Sorting should work.

Reproduction of the problem

In your own example in the documentation you can see this behaviour https://plnkr.co/edit/iH1e7cIAdX5Ds4jY7WYc?p=preview

<template let-column="column"> Hi + {{column.name}} </template>

What is the motivation / use case for changing the behavior?

Sort by column with a customized title

Please tell us about your environment:

Window 10

  • Table version: 0.7.x

    0.11.2

  • Angular version: 2.0.x

    2.1.1

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

    all

  • Language: [all | TypeScript X.X | ES6/7 | ES5] TS 2.0.3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
SriganeshNkcommented, Aug 17, 2017

The above works for let-value, but for let-column It doesn’t. Even with prop and name. This resolved it though

https://github.com/swimlane/ngx-datatable/issues/681#issuecomment-297386597

8reactions
JeanPascalRcommented, Jan 17, 2017

Thanks ! Using prop and name worked for me

<datatable-column name="Foo Bar" prop="fooBar"> <template let-value="value"> {{value}} </template> </datatable-column>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sorting is not working with <ngx-datatable> if the column ...
I am using ngx-datatable. Sorting is not working if the column name having special and camel characters in it. For example : In...
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 >
How to Sort in Excel Rows or Columns Avoid Sort Problems
If you want to sort 2 or more columns in an Excel table, use the Sort dialog box, where you can set up...
Read more >
Alphabetize or sort table data in Pages on Mac - Apple Support
If you're not sure where the merged cells are, select the table, then choose Format > Table > Unmerge All Cells. Text in...
Read more >
SORTBY function - Microsoft Support
In this example, we're sorting a list of people's names by their age, in ascending order. Use SORTBY to sort a range. In...
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