Add spreadsheet-like behavior to your React app.
Before run you need to have installed:
- react": "^16.13.1"
- react-dom: "^16.13.1"
npm i @silevis/reactgrid
Import ReactGrid component
Import css styles
Import basic CSS styles. This file is necessary to correctly display.
Create a cell matrix
Time to define our data. It will be stored in React Hook.
useState hook will be initialized with an object that contains two keys -
Both of them must be valid ReactGrid objects:
To be able to change any value inside the grid you have to implement your own handler. There is a basic handler code:
Then update ReactGrid's component props:
Open live demo on codesandbox.io
Browse docs: here
(c) 2020 Silevis Software Sp. z o.o.