Skip to content

Instantly share code, notes, and snippets.

@rmdort
Created January 4, 2024 23:21
Show Gist options
  • 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