ng-table icon indicating copy to clipboard operation
ng-table copied to clipboard

Dynamic Columns not Sorting

Open bryancjacobs opened this issue 12 years ago • 1 comments

http://plnkr.co/edit/R3sAzRKpELn9349uSYyj?p=preview

I'm receiving a json payload that requires me to create an unknown number of columns. The above plunk is showing what I am trying to do. Perhaps someone could show me a better way to do this.

bryancjacobs avatar Jul 19 '14 01:07 bryancjacobs

You are using same soring key change for all three columns. You must change your column description to have different names, like

$scope.columns = [
    { title: 'Week1', field: 'change1'},
    { title: 'Week2', field: 'change2'},
    { title: 'Week3', field: 'change3'}
];

And implement custom filter and order for your data, to handle names.

maxaon avatar Jul 19 '14 13:07 maxaon