Open heloscream opened 6 years ago
I have made some changes, now on double-click, I can update the header title, but not that particular header, the one I had updated, when I come back clicking the other header than It is sortable, can't understand this nature of datatable
<ngx-datatable-column *ngFor="let col of columns; let i = index" name="{{col.name}}"
prop="{{col.name}}" >
<ng-template let-column="column" let-sort="sortFn" let-row="row" ngx-
datatable-header-template>
<span
(click)="sort()"
title="Double click to edit"
(dblclick)="editing[i +'-'+col.name] = true"
*ngIf="!editing[i +'-'+col.name]">
{{col.name}}
</span>
<input
autofocus
(blur)="updateValue($event, col.name, i)"
*ngIf="editing[i +'-'+col.name]"
type="text"
[value]="col.name"
/>
</ng-template>
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
{{row[col.name]}}
</ng-template>
</ngx-datatable-column>
I'm submitting a ... (check one with "x")
Current behavior
Reproduction of the problem I didn't find any related issues, regarding this header title update, and same time sorting as well , there are only inline editing related to rows but no examples related to header title editing
What is the motivation / use case for changing the behavior? I'm using the edit header to represent or use the edited header title name, some else in my code
Table version: "@swimlane/ngx-datatable": "^10.2.3",
Angular version: 4.3.6
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 ]
Language: [all | TypeScript 2.4.2 | ES6 | ES5]
demo code