I decided to use react-table
to build the grid.
Just one thing to have better UI, that is I want to focus on the input field of the new item after clicking on the add new button.
I intend to use ref
but have no idea how fowardRef
to the child item
Here is my example use of react-table:
https://codesandbox.io/s/beautiful-proskuriakova-lpfxn
In this case, I want to focus on the field First Name
after adding a new row.
UPDATED:
I am able to focus on the input by using autoFocus
support by native HTML.
The answer here
But I still want to handle focus by using React Ref