Skip to content

Feature request: row object in rowEvents #179

@fuchsberger

Description

@fuchsberger

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) } }; 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions