silevis / reactgrid

Add spreadsheet-like behavior to your React app

Home Page:https://reactgrid.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to create new rows onCellClick?

Bijig0 opened this issue · comments

Describe the bug
There is no way to add a new row onCellEnterKeyPress.

Current behavior
Trying to add a window event listener for keypress "enter" does not work as it seems to have been overridden by the ReactGrid component. There is thus no simple way to add new rows for editing with enter key press.

Expected behavior
A way to add rows with enter press of a cell.

Your environment details
N/A

You should be able to add another event listener to window just using addEventListener on it, but if I understood your case correctly (modifying the cell template and) adding your logic inside cell's handleKeyDown could be sufficient.
If that doesn't solve your problem either, you can try using keyDownCapture event on one of the cells/ReactGrid parents.