Topic: Datatable sorting for another languages
Expected behavior
In the data table sorting work if the header or name of the columns like the models which came from the database. For example headelements = ["Id", "Name", "Short name", "Remark"];
and the model of the data
export interface OwnerShip {
id: number;
Name: string;
ShortName: string;
Remark: string;
}
In this configuration, it works perfectly.
Actual behavior
Let image I want to rename elements with the Headers by another language headelements = ["Id", "Имя", "Короткое имя", "Комментарий"];
. It is Russian and I plan multi-languages headers by the same data model. In this case, sorting will not work.
Do you have any ideas on how to solve the problem with it. How I understand the head elements and data model must be the same. Am I right?
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.
Answered
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 10.1.1
- Device: Asus
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 4 years ago
I'm afraid there is no easy workaround in this case. You would need to map your data model and customize its properties if you want to use properties names in another language.