[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
When we use custom template for ngx-datatable-column.
Example : Your own implementation & demo :
https://github.com/swimlane/ngx-datatable/blob/master/demo/templates/template-dom.component.ts
&
https://swimlane.github.io/ngx-datatable/#inline
donot permit dragging for columns Name and Gender but only allow for Age ( which doesn't have a custom ng-template within ngx-data-datatable-column.
Expected behavior
Drag and repositioning of columns should work with inline templates as well
Reproduction of the problem
Please refer below links and try dragging columns other than Age.
https://github.com/swimlane/ngx-datatable/blob/master/demo/templates/template-dom.component.ts
&
https://swimlane.github.io/ngx-datatable/#inline
What is the motivation / use case for changing the behavior?
Dragging should work for custom column headers as well
Please tell us about your environment:
VS Code
Table version: 0.8.x
Yes with most recent version
Angular version: 2.0.x
4.0
Browser: [all ]
Language: [all]
Never mind. Figured on my own. column header template should have 'draggable' class like this :
<ng-template let-column="column" let-sort="sortFn" ngx-datatable-header-template>
<span class="datatable-header-cell-wrapper">
<span class="datatable-header-cell-label draggable" (click)="sort()">{{column.name}}</span></span>
</ng-template>
I would advise you to please improve your documentation to cover these gotchas.
Most helpful comment
Never mind. Figured on my own. column header template should have 'draggable' class like this :
<ng-template let-column="column" let-sort="sortFn" ngx-datatable-header-template> <span class="datatable-header-cell-wrapper"> <span class="datatable-header-cell-label draggable" (click)="sort()">{{column.name}}</span></span> </ng-template>I would advise you to please improve your documentation to cover these gotchas.