Sorting with custom template - click handler doesn't seem to work
See original GitHub issueI’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, post on Stackoverflow or Gitter
Current behavior
Looks a lot like https://github.com/swimlane/ngx-datatable/issues/431
custom column template with server side pagination
on sort function is
(sort)="onPageSorted($event)"
and column is defined as
<ngx-datatable-column name="ID" [resizeable]="false" [sortable]="true" [flexGrow]="1">
<ng-template let-column="column" ngx-datatable-header-template>
{{column.name}}
</ng-template>
<ng-template let-value="value" ngx-datatable-cell-template>
<strong>{{value}}</strong>
</ng-template>
</ngx-datatable-column>
Expected behavior
on click on the column header will trigger the event
Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Table version: 0.8.x
9.3.0
- Angular version: 2.0.x
4.1.3
- 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] TypeScript 2.3.4
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:19
Top Results From Across the Web
Why click event handler doesn't work after sorting the table
I'm using jQuery DataTables and I have a table which is generated using a foreach loop. In each row generated, 2 buttons are...
Read more >Custom sorting a slicer does not work
Hello all, For some strange reason, I suddenly cannot sort a slicer using a custom list. I create the list, double click on...
Read more >Kendo Grid with Column Templates not sorting correctly - Telerik
Hi, I have a Kendo Grid with column templates to handle date formatting, ... the prefix does not appear until unless clicked on...
Read more >Views, filters & sorts – Notion Help Center
Sorts · Click Sort at the top right of your database. · In the dropdown that appears, choose the property you'd like to...
Read more >How to alphabetize in Excel: sort columns and rows A-Z or Z-A
I tried creating a custom list "A,B,C,... etc... .. X,Y,Z,0,1..list but this does not appear to work as I have Value AA00 before...
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
True…but if you do this, it will work: https://github.com/swimlane/ngx-datatable/issues/681#issuecomment-297386597
In your case
Use this
this works now. even if you do not provide the implementation for the sort function.