Installation
Install Spreadsheet 2 using your preferred package manager.
Spreadsheet 2 is hosted in github.com, hence you have to create a personal access token to install the npm package.
Generate personal access token
Visit https://github.com/settings/tokens to generate a personal access token
Login to Github
Enter your personal access token when prompted for password
You can also generate a new personal access token and add this to your .npmrc
file
Install using Yarn or NPM
To install Spreadsheet 2 locally using a package manager, run one of these commands:
Render the Spreadsheet
The code below will render a stateless spreadsheet in your React application.
Adding state
Spreadsheet 2 does not manage any state internally, It is a controlled component.
Developers can pass Spreadsheet state as props and hook into callbacks and continue updating this state externally.
Adjusting the height of the Spreadsheet
The Spreadsheet automatically takes the height of the parent container.
Rending multiple spreadsheets
SpreadsheetProvider
isolates Spreadsheet state to its own container. If you need multiple spreadsheets in a single page, wrap each spreadsheet with the provider
Customising colors and themes
Last updated