DataTable row-select and row-unselect index is always undefined #2068
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
vue2-portable
Milestone
I'm submitting a ... (check one with "x")
CodeSandbox Case (Bug Reports)
Current behavior
Currently when clicking a row in a DataTable,
row-select
androw-unselect
always haveindex
asundefined
.Expected behavior
row-select
androw-unselect
should have the actual index of the clicked item.Minimal reproduction of the problem with instructions
It appears the problem is because
onRowClick
inDataTable.vue
is usingevent.index
instead ofe.index
in the emit.event
is the original browser event, wherease
is the event generated byDTTableBody
, which contains the index. Changingevent.index
toe.index
inonRowClick
fixes the issue.What is the motivation / use case for changing the behavior?
The current behavior is incorrect.
Vue version: 3.2.29
PrimeVue version: 3.11.1
Browser: all
The text was updated successfully, but these errors were encountered: