react-datasheet icon indicating copy to clipboard operation
react-datasheet copied to clipboard

OnKeyDown handle on Cell

Open orangedonkey opened this issue 6 years ago • 4 comments

To allow a key press by the user to indicate whether or not to enter edit-mode.

e.g. The user has selected a numeric cell - if the user now pressed the key '1' then enter edit mode and update the value to 1. If they hit a non-numeric key do nothing. This would all be logic in the OnKeyDown handler implemented by the developer.

This allows the user to skip the step whereby they have to focus the cell before editing (double-click, enter, etc) giving Excel-like cell behavior.

orangedonkey avatar Apr 06 '18 16:04 orangedonkey

I like the idea. I'm thinking something like this:

enterEditModeOnKeyPress={true|false|(key, cell) => bool}

What do you think @orangedonkey

nadbm avatar Apr 13 '18 20:04 nadbm

@nadbm Your idea is good. We expect that when you press enter, it should go to the next cell, not enter edit mode. Thanks. And your idea could fix this issue.

DavidFengAu avatar Apr 18 '18 05:04 DavidFengAu

Will this be added soon? This is like a "Must-Have" to use it within our project.

ibiBgOR avatar Jul 01 '20 07:07 ibiBgOR

Any update on this ?

andreslanzi avatar Aug 10 '23 20:08 andreslanzi