Skip to content

PasteCellContext

Since v3.0.0

Context passed to a column’s BaseColumnConfig.onPaste guard/transform for each cell a paste would write into.

PropertyTypeDescription
valueTValueThe incoming pasted value (the raw structured value for a same-grid paste).
fieldstringThe column field receiving the value.
rowTRowThe target row object (pre-paste state).
rowIndexnumberIndex of the target row in the current data set.
oldValueTValueThe cell’s current value before the paste.
sourceField?stringThe column field the value was copied FROM (the origin column), for a same-app paste. undefined for an external paste (e.g. from Excel) or when the source column is unknown. Use it to reject cross-column / cross-type pastes (e.g. refuse a value copied from a “car” column into a “fruit” column). To compare types, look up your own column config by this field. v3.0.0+
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt