Links

DeleteSheetConfirmation

A confirmation dialog that can be displayed before deleting a sheet
Delete sheet confirmation
import { CanvasGrid, DeleteSheetConfirmation } from "@rowsncolumns/spreadsheet"
import { useSpreadsheetState } from "@rowsncolumns/spreadsheet-state"
const App = () => {
const activeSheetId = 1
const { onDeleteSheet, onRequestDeleteSheet } = useSpreadsheetState({
...
})
return (
<>
<button onClick={onRequestDeleteSheet}>Delete current sheet</button>
<CanvasGrid />
<DeleteSheetConfirmation
sheetId={activeSheetId}
onDeleteSheet={onDeleteSheet}
/>
</>
)
}