question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: row object in rowEvents

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
AllenFangcommented, Jan 28, 2018

@Sathras sure, I’ll consider to add this feature 😃 . thanks!!

1reaction
AllenFangcommented, Feb 10, 2018

Hey all, this feature will be released in next week(2/14), thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

GridView Focused Row Events - DevExpress Support
This event works perfectly except in the case where Grouping is applied to Grid A. I understand how the grid creates "False" rows...
Read more >
Work on Row · react-bootstrap-table2
Row Events. rowEvents. Currently, react-bootstrap-table2 only wrapped up the following events to allow its callback to receive row and rowIndex ...
Read more >
Grid Events - AG Grid
This is a list of the events that the grid raises. You can register callbacks for these events through the GridOptions interface.
Read more >
Events | Tabulator
Table Events; Column Events; Row Events; Cell Events; Data Events; Edit Events; HTML Import Events; Filter Events; Sorting Events; Layout Events ...
Read more >
Open Custom Modals On Click For Table Rows - YouTube
Open Custom Modals On Click For Table Rows Using React-Bootstrap-Table2. This is going to be a fairly simple tutorial where we will cover ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found