-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type "checkbox" is not assignable to type SelectionType #1873
Comments
The same problem here Angular version: TypeScript version: How to fixed? |
I got it to work in ng9 strict mode by importing SelectionType... import {DatatableComponent, SelectionType} from '@swimlane/ngx-datatable'; And using this syntax... [selectionType]="SelectionType.checkbox" |
Import it Declare it
initialize it |
<ngx-datatable
class="material"
[rows]="deviceConfigList"
[columnMode]="'force'"
[headerHeight]="42"
[footerHeight]="30"
[sorts]="[{prop: 'deviceFunction', dir: 'asc'}]"
[rowHeight]="75"
[scrollbarV]="true"
[selected]="selected"
[selectionType]="'checkbox'"
(select)='onSelect($event)'>
I'm submitting a ... (check one with "x")
Current behavior
For the above code Angular 9 running in strict mode reports the type error: "Type '"checkbox"' is not assignable to type 'SelectionType'." Also, IntelliJ IDE detects the same error. As a result I cannot build this app in strict mode. It builds with fullTemplateTypeCheck enabled. The UI works as expected with this syntax.
Table version:
"@swimlane/ngx-datatable": "^17.0.0"
Angular version:
Version 9.1.2
TypeScript version:
TypeScript 3.8.3
The text was updated successfully, but these errors were encountered: