Topic: Intercept data mdbTable sort Event
                  
                  bitjuice
                  pro
                  asked 6 years ago
                
Hi,
I'm using mdbTable and I need to intercept sort event and get selected sortBy field and sortBy order.
Is there a way to do this?
I noticed that there is sortEnd output of MdbTableSortDirective, but it returns also source array.
Thanks
                      
                      bitjuice
                      pro
                        answered 6 years ago
                    
Hi Bartosz,
I find that the "sortOrder: undefined" is returned if all the cells in that column have the same value.
Thanks
Marco
Bartosz Termena staff commented 6 years ago
Hi! Thank you for reporting the problem. We will take a closer look at that, and we will fix it as soon as possible.
Best Regards, Bartosz.
                      
                      bitjuice
                      pro
                        answered 6 years ago
                    
Hi Arkadiusz
thank for the (sorted) output added on 8.5.0 release.
But I noticed a problem when I bind [sortBy] input attribute to a subObject property. In this case, sortOrder return undefined (while sortBy works)

Could you fix it in the next release?
Thanks
Bartosz Termena staff commented 6 years ago
Hi!
Thank you for reporting the problem, we will take a closer look at that and try to fix as soon as possible.
Best Regards, Bartosz.
Bartosz Termena staff commented 6 years ago
Hi!
Could you show me your code? I can not reproduce your problem.
Best Regards, Bartosz.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
 - Premium support: No
 - Technology: MDB Angular
 - MDB Version: 8.3.1
 - Device: PC
 - Browser: Chorme
 - OS: Windows 10
 - Provided sample code: No
 - Provided link: No
 
Arkadiusz Idzikowski staff commented 6 years ago
Unfortunately for now this event emit only sorted array. We will add some other useful properties there.