DataTable wrong TypeScript definition for row click events #1715
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
vue2-portable
Milestone
Current behavior
DataTable
row-click
event is defined as Dom Event in https://github.com/primefaces/primevue/blob/master/src/components/datatable/DataTable.d.ts#L109However in the Documentation and in the code (https://github.com/primefaces/primevue/blob/master/src/components/datatable/TableBody.vue#L396) the event is an Object in the form:
Expected behavior
correct definition of row-click.
Note
If I compare the 'Events' listing under https://primefaces.org/primevue/showcase/#/datatable with the type definitions at https://github.com/primefaces/primevue/blob/master/src/components/datatable/DataTable.d.ts#L94, I think that most event definitions are not correct.
What is the motivation / use case for changing the behavior?
I get typescript errors because the types are not correct:
error TS2322: Type '(event: { originalEvent: MouseEvent; data: MyModel; index: number; }) => void' is not assignable to type '(event: Event) => void'.
Please tell us about your environment:
Vue version: 3.2.20
PrimeVue version: 3.8.2
The text was updated successfully, but these errors were encountered: