- Notifications
You must be signed in to change notification settings - Fork 431
Closed
Description
Would it be possible to make the row data object available on a rowEvent?
const rowEvents = { onClick: (event, row) => { console.log(`row ${row.id} was clicked.` ) } };
This would really help to avoid passing data as data-attributes down to the dom and then reading them through the event data.
Alternatively, i can also think of adding a flag to selectRow.onSelect
that indicates whether the row was selected/deselected via the radio/checkbox or via click on row.
this should only be available when the clickToSelect is enabled. an example could be:
const selectRow = { mode: 'checkbox', clickToSelect: true onSelect: (row, isSelect, rowIndex, rowClick) => { if(rowClick) // redirect to row.href else // default (select row) } };