Open ninoguba opened 2 years ago
I have a solution, you have to change the html to: [sortType]="SortType.multi"
And you have to declare a variabele in the typescript file (above the constructor) like ( and dont forget to import SelectionType):
SortType = SortType;
Import: import { ColumnMode, SortType } from 'projects/swimlane/ngx-datatable/src/public-api';
I found this answer in the official docs (the same for selection and sorting): https://github.com/swimlane/ngx-datatable/blob/master/src/app/selection/selection-single.component.ts http://swimlane.github.io/ngx-datatable/#single-selection
I was able to workaround the issue by setting this in my html:
[sortType]="sort"
And this in my component:
sort: any = 'multi';
I'm submitting a ... (check one with "x")
Current behavior
When building app for production, it fails with the following message:
error TS2322: Type '"multi"' is not assignable to type 'SortType'.
The error happens too if using [sortType]="'single'".
Expected behavior
No build errors related to ngx-datatable.
Reproduction of the problem
Add sortType attribute to your ngx-datatable component.
What is the motivation / use case for changing the behavior?
N/A
Please tell us about your environment:
Table version: 20.0.0
Angular version: 12.1.1
Browser: All
Language: All