inovua / reactdatagrid

Empower Your Data with the best React Data Grid there is
https://reactdatagrid.io
Other
3.45k stars 57 forks source link

Incorrect onRowDoubleClick behaviour with scroll #400

Open mashechko opened 7 months ago

mashechko commented 7 months ago

Relevant code or config

<Table
  onRowDoubleClick={(e, row) => {
    console.log(row.data);
    onRowDoubleClickHandler(e, row);
  }}
  // other props...
/>

What you did:

Set up the onRowDoubleClick event handler to handle double-click events on rows in the table. Scroll to the end of the table and double-click on any row.

What happened:

The onRowDoubleClick event handler is not working correctly. It's passing the data of one of the top rows instead of the one that was double-clicked.

Reproduction repository:

https://codesandbox.io/s/intelligent-zhukovsky-vvqkk9?file=/src/App.js

https://github.com/inovua/reactdatagrid/assets/53085936/75bf54df-7ac9-4dab-bbb8-79c25f195fdd

Problem description:

The onRowDoubleClick event handler in the library is not working as expected. When a row is double-clicked, the event handler is triggered with the data of the row above the one that was actually double-clicked. This is problematic as it prevents the correct handling of double-click events.

rstiyer commented 3 months ago

Has any progress been made on this issue? I'm encountering the same bug.

ovidiu-pacurar commented 1 month ago

The same broken behavior is happening with renderRowContextMenu. When we scroll down, the menu is shown for a row a few places above the right clicked row.