EasyUI Forum

General Category => EasyUI for React => Topic started by: chrwei on October 10, 2022, 05:51:38 AM



Title: DataGrid keyboard navigation
Post by: chrwei on October 10, 2022, 05:51:38 AM
in EasyUI for jQuery I was able to add keyboard navigation (up, down, enter) to a DataGrid using this:

Code:
.datagrid('getPanel').panel('panel').attr('tabindex',1).unbind('keydown').bind('keydown', ...

I've tried setting tabIndex={1} on the datagrid, but the onKeyDown still doesn't fire, even after clicking a row to make sure it has focus.  I've also tried tabIndex 0, -1, and 5000 just in case it was a index conflict.  any hidden little tricks to enable this feature?


Title: Re: DataGrid keyboard navigation
Post by: chrwei on October 10, 2022, 07:14:13 AM
I was able to make something work by wrapping it in a div like was suggested for the Accordion header.  is there a better way?