primeng icon indicating copy to clipboard operation
primeng copied to clipboard

DataTable sortField attribute cause Exception on 1.1.1+

Open ymuller opened this issue 9 years ago • 4 comments

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
``

**Current behavior**
DataTable do not work with primeng 1.1.1+ but is fine with 1.1.0.

Below is the exception
TypeError: Cannot read property 'find' of undefined at DataTable.ngDoCheck (datatable.js:285) 

* **Angular version:** 2.0.X
I'm running Angular 2.4.2 (the issue is there also with 2.4.0 and 2.4.1)

* **PrimeNG version:** 2.0.X
1.1.1, 1.1.2, 1.1.3, 1.1.4


ymuller avatar Jan 11 '17 15:01 ymuller

Is it possible to provide a plunkr?

cagataycivici avatar Jan 11 '17 15:01 cagataycivici

i have the same bug.

if i use sortfield => "Cannot read property 'find' of undefined at DataTable.ngDoCheck" if i use NO sortfield => "its run"

cyberrranger avatar Jan 11 '17 15:01 cyberrranger

Sorry, I am not used to plunkr, so below is a small code snippet <p-dataTable [value]="model.list" selectionMode="multiple"[(selection)]="selectedContactPersons" sortField="firstNameAndLastName" [sortOrder]="1"> <p-column field="firstNameAndLastName" header="myHeader" [sortable]="true"> </p-dataTable>

ymuller avatar Jan 11 '17 16:01 ymuller

Similar issue with multisort has been reported with a plunker, but it hasn't beenreviewed by any primeng team member.

https://github.com/primefaces/primeng/issues/1663

thx

ASK83 avatar Jan 11 '17 17:01 ASK83