Skip to content

defaultPasteHandler

Default paste handler that applies pasted data to grid.rows.

This is the built-in handler used when no custom pasteHandler is configured. It clones the rows array for immutability and applies values starting at the target cell.

Behavior:

  • Single cell selection: paste expands freely, adds new rows if needed
  • Range/row selection: paste is clipped to fit within selection bounds
  • Non-editable columns: values are skipped (column alignment preserved)
function defaultPasteHandler(detail: PasteDetail, grid: GridElement): void
NameTypeDescription
detailPasteDetailThe parsed paste data from clipboard
gridGridElementThe grid element to update
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt