Topic: DataTable sort not working
Xenia free asked 3 years ago
Expected behavior
I have the table with data from API and it correctly works and displays all information. I want to sort them.
Actual behavior When I push on the icon nothing happened. I have the same headers as in the TS file and in the HTML file. I did it all correctly as in the documentation. I also use the trim method. Recommend me some ideas to solve the proplem. Thank you.
Resources (screenshots, code snippets etc.)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 10.1.1
- Device: Asus
- Browser: Chrome
- OS: Windows 7
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 3 years ago
From which example in the documentation did you copy the code? Are there any errors in the console when you click on the sort icon?
Xenia free commented 3 years ago
https://ng-demo.mdbootstrap.com/tables/data-tablesTable "Basic Example". There are no errors in the console.
Arkadiusz Idzikowski staff commented 3 years ago
Did you copy all the HTML and TS code from this example? https://mdbootstrap.com/docs/angular/tables/datatables/#basic-example
I double-checked that and it looks like everything is working correctly. In case of any further problems, please update your post and add the example code on which we will be able to reproduce this bug.