Custom header not sorting column
See original GitHub issueHi, when I use this template https://github.com/esvit/ng-table/blob/master/src/ng-table/sorterRow.html as custom template (as external file without any modification , script id is testtableheader) , then ng-click event not fired for me. When I not use the template-header=“testtableheader” in my table then everything is ok, sorting works fine.
id="xxxModalContent.html
<div class="table-browser" ng-controller="xxxController" >
<table ng-table="tableParams" show-filter="false" class="table" template-header="testtableheader">
<tr ng-repeat="datas in $data" ng-click="selectrow(datas)" class="{{['even', 'odd'][$index %2]}}">
<td data-title="'Id'" sortable="'id'">{{datas.id}}</td>
<td data-title="'Name'" sortable="'name'">{{datas.name}}</td>
</tr>
</table>
</div>
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
Column sorting not working when using custom HeaderView
If I set the TableView obj my custom HeaderView , clicking on the header won't sort, even though my custom HeaderView re-implements nothing....
Read more >How to Make Custom Sorting Headers in Tableau - phData
In this post, I'll be walking through how to create table headers in Tableau that allows your users to customize the sorting of...
Read more >Frozen top row not recognized as header in custom sort
I want to custom sort my excel sheet alphabetically by my first 2 columns, "first name" and "last name". I have the first...
Read more >Sorting not working on Custom Header Cell - Telerik
The sort doesnt work when I use a CustomHeaderCell for that particular column. Can you help me out with that please?
Read more >Excel Sort by Column without Header (5 Methods) - ExcelDemy
Whenever you try to sort any data, excel will sort it by column if you do not instruct it to do otherwise using...
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
@christianacca I’m having the same issue with custom header, used your example and my template is rendered, but sort function is not working, already tried
ng-click="$ctrl.sortBy($column, $event)"
,ng-click="sortBy($column, $event)"
orin my
th
and none of this is working, am i missing something?The example is a bit outdated. The new header template uses
ng-table-sorter-row
directive.sortBy($column, event)
is now defined insidengTableSorterRowController
Since we don’t have an ability to overridesorterRow
template, the easy fix would be to use this controller in header template, like: