Topic: Angular Table Sort not working

surabathula karthik pro asked 3 years ago


Hi Team,

Sort on Datatable is not working, could you please check. I have pushed code to github and below is the link for the same. I am currently using back-end application to get data, if u can fix a table with dummy data as well it would be fine.

Please do the needful.

Link removed

Thankskarthik


Konrad Stępień staff answered 3 years ago


Hi @surabathula karthik,

Thank you for report the issue, but I can't restore your problem.

Your code has many issues, for example, you import pro package version 8.4.0 but in your project, you include zip 9.1.0, also you didn't set types for functions arguments.

Could you make for me a simple project (without pro zip, or hide token) and give for me link or send zip for my mail: k.stepien@mdbootstrap.com

Best, Konrad


surabathula karthik pro commented 3 years ago

Hi Konrad,I am not able to send u file through mail, i have uploaded the same to github. .

github


surabathula karthik pro commented 3 years ago

Hi Konrad,

Is there any update on the sort issue. i found that there is below error when i try to sort it. I tried to 8.4, even then i am having error. I have sent u mail, link is in above comment as well. Could you please check.

ExamComponent.html:51 ERROR TypeError: Cannot read property 'sort' of undefined at MdbTableSortDirective.sortDataBy (ng-uikit-pro-standard.js:9127) at MdbTableSortDirective.onclick (ng-uikit-pro-standard.js:9088) at Object.eval [as handleEvent] (ExamComponent.html:51) at handleEvent (core.js:43993) at callWithDebugContext (core.js:45632) at Object.debugHandleEvent [as handleEvent] (core.js:45247) at dispatchEvent (core.js:29804) at core.js:42925 at HTMLTableCellElement. (platform-browser.js:2668) at ZoneDelegate.invokeTask (zone-evergreen.js:391)

Thanks, Karthik


Konrad Stępień staff commented 3 years ago

I did answer you. Just copy the example from documentation and provide your data correctly.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.1.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No