Datatable sort is not working after upgrading to primeng-4.2.2

UI Components for Angular
Post Reply
venki143mca
Posts: 2
Joined: 29 Sep 2017, 20:48

17 Oct 2017, 19:53

I upgraded code to Angular 4.4.4. prime-ng is working with 1.0.0 without any issues.

I upgraded primeng also to latest 4.2.2, look like sorting is not working. I see sorting is working in specific situation below.

1) click on sort header , it does not do anything.
2) click on pagination item.
3) now it sorts based on the sorting which I have clicked on step1 and paginates.

Don't know what's happening. Any suggestions please?

Angular : 4.4.4
prime-ng: 4.2.2

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

18 Oct 2017, 13:56

I'm not able to replicate with datatable sort example https://www.primefaces.org/primeng/#/datatable/sort
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

chintu.pillai
Posts: 3
Joined: 27 Oct 2017, 09:17

27 Oct 2017, 09:21

I have same issues with 4.2.2 , sorting is not working for columns with large values . These are the values in columns and when i tried sorting

100000000
20000000
20000000
200000000
20000000
20000000
50000000
200000000
200000000
100000000


And when i tried to sort it comes like , only sorting is worked based on the first letter not the full value


100000000
100000000
20000000
20000000
20000000
20000000
200000000
200000000
200000000
50000000


Is there anyway to fix this ?

venki143mca
Posts: 2
Joined: 29 Sep 2017, 20:48

28 Oct 2017, 00:26

It's not a solution,

I know it's weird but as soon as I copied primeng datatable code (datatable.ts, and css file) from git and placed in my project, pointed the local datatable file instead of nodemodules file. Sorting started working. Till some time it worked fine and suddenly the total datatable itself does not load initially on page load till I select pagination.

Now this issue is related to changeDetection and tried below steps which are un helpful.
1) using immutable attribute
2) adding changeDetection.detectChanges() code to the code.

Need to find a way to load datatable.
Thanks,
Eswar Ramisetti.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

29 Oct 2017, 03:13

@chintu.pillai It is a string based sorting if you are using String type.Can you create a plunker example to replicate the issue.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

chintu.pillai
Posts: 3
Joined: 27 Oct 2017, 09:17

30 Oct 2017, 14:15


chintu.pillai
Posts: 3
Joined: 27 Oct 2017, 09:17

31 Oct 2017, 08:50

Any way to solve this ?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests