Skip to content

Instantly share code, notes, and snippets.

@rmdort
Created January 4, 2024 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmdort/5821a844003ec78c1a30cbf00b21947d to your computer and use it in GitHub Desktop.
Save rmdort/5821a844003ec78c1a30cbf00b21947d to your computer and use it in GitHub Desktop.
// Setup
const { onIncreaseIndent, onDecreaseIndent } = useSpreadsheetState()
return (
<CanvasGrid
onIncreaseIndent={onIncreaseIndent}
onDecreaseIndent={onDecreaseIndent}
/>
)
// Usage
const api = useSpreadsheetApi()
api.getActiveSheet().getActiveCell().increaseIndent()
api.getActiveSheet().getActiveCell().decreaseIndent()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment