gregnb / gregnb/mui-datatables

Request

Open
#2,011 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

how can we prevent from onRowClick in a customBodyRender column
Suppose we have a button or a select or an input box in the column. Then if we try to access this column it would also call the onRowClick function

Solution:
Can provide event argument in onRowClick() callback

i.e.
onRowClick: function(event: any, rowData: string[], rowMeta: { dataIndex: number, rowIndex: number }) => void

then in callback user can use it to prevent further propagation.

Solution 2:
Can provide the column index argument in onRowClick() callback

i.e. onRowClick: function(rowData: string[], rowMeta: { columnIndex: number, dataIndex: number, rowIndex: number }) => void

then in callback user can use it to prevent further propagation.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.