angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

headerRenderer arguments don't match demo (PR?)

Open jnelson opened this issue 9 years ago • 2 comments

It would be useful for headerRenderer to take the same arguments as cellRenderer, as is currently implied in the templates demo at https://github.com/swimlane-contrib/angular-data-table/blob/5bb422f69ec4f77d3aa6ab1006ea6c351eac95f0/demos/templates.html#L80:

                 headerRenderer: function(scope, elm){

Instead, it only gets the element (no scope) https://github.com/swimlane-contrib/angular-data-table/blob/5bb422f69ec4f77d3aa6ab1006ea6c351eac95f0/src/components/header/HeaderCellDirective.js#L59:

            let elm = angular.element(ctrl.column.headerRenderer($elm));

Would you accept a PR to make this potentially breaking change so the code matches the demo? Alternatively, even though it's ugly, we could reverse the order of the arguments to avoid breakage.

jnelson avatar May 05 '16 21:05 jnelson

@amcdnl No interest in any change on this one?

jnelson avatar May 11 '16 22:05 jnelson

Whooops, closed on accident! Yes, this looks good. PR and Ill accept :)

amcdnl avatar May 11 '16 23:05 amcdnl