Result: after editing Ada's status, choosing Active and pressing Enter, the cell contains Active.
Editor example (requires host, workbook and data)
This editor example needs an initialized host, a workbook and data. For the result above, use a text column for the name and a text column with editor: "status" for the status, with one row containing "Ada" and "Prospect".
When the user edits a cell in a column with editor: "status", a select list opens over the cell. Picking "Active" and pressing Enter commits "Active" and moves down.
Editor contract
One retained wrapper and one CellEditorInstance exist per active edit:
Hook / value
Guarantee
mount(host, context)
Runs once. The host is positioned over the active cell.
context.address / viewAddress
Canonical data-row and current displayed-row snapshots. They are readonly; mutating a JavaScript object received by the editor cannot retarget the edit.
context.value / text / initialInput
Resolved scalar, formatted text, and optional typed character.
context.label
Accessible name derived from the semantic or positional header plus the row number.
context.signal
Aborted before the editor's cancel() or destroy() hook on cancel, commit, reset, or unmount.
context.commit() / cancel()
Optional editor-driven completion using the canonical path. A non-string commit from untyped JavaScript cancels safely.
update(context)
External value, theme, zoom, view permutation, or geometry-sensitive state changed without replacing ownership.
reposition(rect)
The active cell moved or resized.
commit()
May return input synchronously or asynchronously; duplicate completion is ignored.
cancel()
Notification before a host-requested cancellation; the signal is already aborted.
destroy()
Runs exactly once; late async work must observe the aborted signal. A thrown hook error is reported without interrupting Sheetwrite's DOM, listener, or store cleanup.
The returned value is parsed with the column's normal type. It commits through the same document transaction as stock editing. That preserves protection, validation, mutation policy, undo/redo, change events, and edit-commit events.
Keys inside the editor:
Key
Effect
Enter
Commit and move down.
Tab / Shift+Tab
Commit and move horizontally.
Escape
Cancel.
Focus returns to the grid after commit or cancel.
Asynchronous editors
For remote choices, use the editor-owned AbortSignal. Never let a late request write into a destroyed editor:
An asynchronous commit stays bound to the data row captured at mount. This holds even when sorting or clearView() moves that row before the promise settles.
Framework adapters
editors is construction-bound, so React, Vue and Svelte resets safely abort and destroy an active editor before they publish the new grid generation. All adapters accept the same registry:
const grid: Gridconstgrid:Gridconstgrid:GridThe imperative core grid this controller owns.API reference →function createGrid(host: HTMLElement, opts: GridOptions): GridfunctioncreateGrid(host:HTMLElement,opts:GridOptions,):GridfunctioncreateGrid(host:HTMLElement,opts:GridOptions,):GridCreates and mounts an imperative Grid in the supplied host element.Exampleimport { createGrid, initSheetwrite } from"@sheetwrite/core";awaitinitSheetwrite();consthost= document.createElement("div");host.style.height ="400px";document.body.append(host);constgrid=createGrid(host, {workbook: {activeSheet: "sales",sheets: [{ id: "sales", name: "Sales", rowCount: 2,columns: [{ key: "amount", header: "Amount", type: "number", width: 120 }] }],},data: { rowCount: 2, columns: { amount: [12, 18] } },});grid.scrollToCell({ sheet: "sales", row: 1, col: 0 });// Call when the host view is removed.grid.destroy();See alsoGrid *See alsoGridOptionsAPI reference →const host: HTMLElementconsthost:HTMLElementconsthost:HTMLElementGridOptions.workbook: WorkbookinterfaceGridOptions {workbook:Workbook;}interfaceGridOptions {workbook:Workbook;}Live workbook schema adopted by the store and updated by document operations.API reference →GridOptions.data?: ColumnarData | undefinedinterfaceGridOptions {data?:ColumnarData|undefined;}interfaceGridOptions {data?:ColumnarData|undefined;}Eager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →GridOptions.presentation?: GridPresentation | undefinedinterfaceGridOptions {presentation?:GridPresentation|undefined;}interfaceGridOptions {presentation?:GridPresentation|undefined;}Header presentation. Spreadsheet mode (default) paints positional A/B/C labels; data-grid mode paints each column's semantic header. Cell addressing, row indices, clipboard values, formulas, and exports are unchanged in both modes.API reference →GridOptions.editors?: Record<string, CellEditor> | undefinedinterfaceGridOptions {editors?:Record<string, CellEditor> |undefined;}interfaceGridOptions {editors?:|Record<string, CellEditor>|undefined;}Named custom editors resolved from each column's editor field.API reference →status: CellEditorlet status:CellEditorlet status:CellEditorAPI reference →const statusEditor: CellEditorconststatusEditor:CellEditorconststatusEditor:CellEditorAPI reference →interface CellEditorinterfaceCellEditorinterfaceCellEditorFramework-neutral named editor definition registered through GridOptions.editors.API reference →CellEditor.mount(host: HTMLElement, context: CellEditorContext): CellEditorInstanceCellEditor.mount(host: HTMLElement, context: CellEditorContext): CellEditorInstanceCellEditor.mount(host: HTMLElement, context: CellEditorContext): CellEditorInstancehost is an empty element that core owns, positions and clips.API reference →host: HTMLElementlet host:HTMLElementlet host:HTMLElementcontext: CellEditorContextlet context:CellEditorContextlet context:CellEditorContextAPI reference →const select: HTMLSelectElementconstselect:HTMLSelectElementconstselect:HTMLSelectElementvar document: Documentvar document:Documentvar document:Documentwindow.document returns a reference to the document contained in the window. MDN ReferenceAPI reference →Document.createElement<"select">(tagName: "select", options?: ElementCreationOptions): HTMLSelectElement (+2 overloads)Document.createElement<"select">(tagName: "select", options?: ElementCreationOptions): HTMLSelectElement (+2 overloads)Document.createElement<"select">(tagName: "select", options?: ElementCreationOptions): HTMLSelectElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceElement.setAttribute(qualifiedName: string, value: string): voidElement.setAttribute(qualifiedName: string, value: string): voidElement.setAttribute(qualifiedName: string, value: string): voidThe setAttribute() method of the Element interface sets the value of an attribute on the specified element. MDN ReferenceCellEditorContext.label: stringinterfaceCellEditorContext {label:string;}interfaceCellEditorContext {label:string;}Menu row text. Defaults per action.API reference →const value: stringconstvalue:stringconstvalue:stringHTMLSelectElement.add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): voidHTMLSelectElement.add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number |null): voidHTMLSelectElement.add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number |null): voidThe HTMLSelectElement.add() method adds an element to the collection of option elements for this select element. MDN Referencevar Option: new (text?: string, value?: string, defaultSelected?: boolean, selected?: boolean) => HTMLOptionElementvar Option:new (text?:string,value?:string,defaultSelected?:boolean,selected?:boolean,) =>HTMLOptionElementvar Option:new (text?:string,value?:string,defaultSelected?:boolean,selected?:boolean,) =>HTMLOptionElementHTMLSelectElement.value: stringinterfaceHTMLSelectElement {value:string;}interfaceHTMLSelectElement {value:string;}The HTMLSelectElement.value property contains the value of the first selected option element associated with this select element. MDN ReferenceCellEditorContext.text: stringinterfaceCellEditorContext {text:string;}interfaceCellEditorContext {text:string;}Formula source when the cell is a formula, else the literal display text.API reference →Node.appendChild<HTMLSelectElement>(node: HTMLSelectElement): HTMLSelectElementNode.appendChild<HTMLSelectElement>(node: HTMLSelectElement): HTMLSelectElementNode.appendChild<HTMLSelectElement>(node: HTMLSelectElement): HTMLSelectElementThe appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node. MDN ReferenceHTMLOrSVGElement.focus(options?: FocusOptions): voidHTMLOrSVGElement.focus(options?: FocusOptions): voidHTMLOrSVGElement.focus(options?: FocusOptions): voidMDN ReferenceAPI reference →CellEditorInstance.update(context: CellEditorContext): voidCellEditorInstance.update(context: CellEditorContext): voidCellEditorInstance.update(context: CellEditorContext): voidUpdates a retained element after its value, style, theme, or geometry changes.API reference →next: CellEditorContextlet next:CellEditorContextlet next:CellEditorContextAPI reference →CellEditorInstance.reposition(rect: CellEditorRect): voidCellEditorInstance.reposition(rect: CellEditorRect): voidCellEditorInstance.reposition(rect: CellEditorRect): voidrect: CellEditorRectlet rect:CellEditorRectlet rect:CellEditorRectAPI reference →ElementCSSInlineStyle.style: CSSStyleDeclarationinterfaceElementCSSInlineStyle {style:CSSStyleDeclaration;}interfaceElementCSSInlineStyle {style:CSSStyleDeclaration;}MDN ReferenceAPI reference →CSSStyleDeclaration.width: stringinterfaceCSSStyleDeclaration {width:string;}interfaceCSSStyleDeclaration {width:string;}MDN ReferenceAPI reference →CellEditorRect.width: numberinterfaceCellEditorRect {width:number;}interfaceCellEditorRect {width:number;}Unzoomed column width in CSS pixels.API reference →CSSStyleDeclaration.height: stringinterfaceCSSStyleDeclaration {height:string;}interfaceCSSStyleDeclaration {height:string;}MDN ReferenceAPI reference →CellEditorRect.height: numberinterfaceCellEditorRect {height:number;}interfaceCellEditorRect {height:number;}Host height in CSS pixels for numbers or any CSS length string.API reference →CellEditorInstance.commit(navigation: CellEditorNavigation): string | undefined | Promise<string | undefined>CellEditorInstance.commit(navigation: CellEditorNavigation): string |undefined|Promise<string |undefined>CellEditorInstance.commit(navigation: CellEditorNavigation): string |undefined|Promise<string |undefined>CellEditorInstance.cancel(): voidCellEditorInstance.cancel(): voidCellEditorInstance.cancel(): voidAPI reference →CellEditorInstance.destroy(): voidCellEditorInstance.destroy(): voidCellEditorInstance.destroy(): voidRuns immediately before a retained element is removed or replaced.API reference →HTMLSelectElement.remove(): void (+1 overload)HTMLSelectElement.remove(): void (+1 overload)HTMLSelectElement.remove(): void (+1 overload)The HTMLSelectElement.remove() method removes the element at the specified index from the options collection for this select element. MDN Referenceconst input: HTMLInputElementconstinput:HTMLInputElementconstinput:HTMLInputElementDocument.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)Document.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)Document.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN Referenceconst list: HTMLDataListElementconstlist:HTMLDataListElementconstlist:HTMLDataListElementDocument.createElement<"datalist">(tagName: "datalist", options?: ElementCreationOptions): HTMLDataListElement (+2 overloads)Document.createElement<"datalist">(tagName: "datalist", options?: ElementCreationOptions): HTMLDataListElement (+2 overloads)Document.createElement<"datalist">(tagName: "datalist", options?: ElementCreationOptions): HTMLDataListElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceElement.id: stringinterfaceElement {id:string;}interfaceElement {id:string;}The id property of the Element interface represents the element's identifier, reflecting the id global attribute. MDN ReferenceAPI reference →CellEditorContext.address: Readonly<CellAddress>interfaceCellEditorContext {address:Readonly<CellAddress>;}interfaceCellEditorContext {address:Readonly<CellAddress>;}Underlying data address, suitable for a set patch.API reference →row: numberlet row:numberlet row:number0-based row of the cell that holds the top-left corner.API reference →col: numberlet col:numberlet col:number0-based column of the cell that holds the top-left corner.API reference →HTMLInputElement.value: stringinterfaceHTMLInputElement {value:string;}interfaceHTMLInputElement {value:string;}The value property of the HTMLInputElement interface represents the current value of the input element as a string. MDN ReferenceCellEditorContext.initialInput: string | undefinedinterfaceCellEditorContext {initialInput:string|undefined;}interfaceCellEditorContext {initialInput:string|undefined;}API reference →ParentNode.append(...nodes: (Node | string)[]): voidParentNode.append(...nodes: (Node | string)[]): voidParentNode.append(...nodes: (Node | string)[]): voidInserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. MDN Referencefunction fetch(input: string | URL | Request, init?: RequestInit): Promise<Response> (+2 overloads)
namespace fetchfunctionfetch(input:string|URL|Request, init?:RequestInit):Promise<Response> (+2overloads)namespacefetchfunctionfetch(input:string|URL|Request, init?:RequestInit):Promise<Response> (+2overloads)namespacefetchMDN Referencefunction encodeURIComponent(uriComponent: string | number | boolean): stringfunctionencodeURIComponent(uriComponent:string|number|boolean,):stringfunctionencodeURIComponent(uriComponent:string|number|boolean,):stringEncodes a text string as a valid component of a Uniform Resource Identifier (URI).@param uriComponent A value representing an unencoded URI component.RequestInit.signal?: AbortSignal | null | undefinedinterfaceRequestInit {signal?:AbortSignal|null|undefined;}interfaceRequestInit {signal?:|AbortSignal|null|undefined;}An AbortSignal to set request's signal.API reference →CellEditorContext.signal: AbortSignalinterfaceCellEditorContext {signal:AbortSignal;}interfaceCellEditorContext {signal:AbortSignal;}Abort between bounded encode chunks or store windows.API reference →Promise<Response>.then<{
id: string;
name: string;
}[], never>(onfulfilled?: ((value: Response) => {
id: string;
name: string;
}[] | PromiseLike<{
id: string;
name: string;
}[]>) | null | undefined, onrejected?: ((reason: any) => PromiseLike<never>) | null | undefined): Promise<{
id: string;
name: string;
}[]>Promise<Response>.then<{id:string;name:string;}[], never>(onfulfilled?: ((value:Response) => {id: string;name: string;}[] |PromiseLike<{id:string;name:string;}[]>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<{id:string;name:string;}[]>Promise<Response>.then<{id:string;name:string;}[], never>(onfulfilled?: ((value:Response) => {id: string;name: string;}[] |PromiseLike<{id:string;name:string;}[]>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<{id:string;name:string;}[]>Attaches callbacks for the resolution and/or rejection of the Promise.@param onfulfilled The callback to execute when the Promise is resolved.@param onrejected The callback to execute when the Promise is rejected.@returns A Promise for the completion of which ever callback is executed.response: Responselet response:Responselet response:ResponseBody.json(): Promise<any>Body.json(): Promise<any>Body.json(): Promise<any>MDN Referenceinterface Promise<T>interfacePromise<T>interfacePromise<T>Represents the completion of an asynchronous operationinterface Array<T>interfaceArray<T>interfaceArray<T>id: stringlet id:stringlet id:stringStable identity used by operations, history, and collaboration rebase.API reference →name: stringlet name:stringlet name:stringUser-facing caption.API reference →Promise<{ id: string; name: string; }[]>.then<void, never>(onfulfilled?: ((value: {
id: string;
name: string;
}[]) => void | PromiseLike<void>) | null | undefined, onrejected?: ((reason: any) => PromiseLike<never>) | null | undefined): Promise<void>Promise<{ id: string; name: string; }[]>.then<void, never>(onfulfilled?: ((value: {id:string;name:string;}[]) =>void| PromiseLike<void>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<void>Promise<{ id: string; name: string; }[]>.then<void, never>(onfulfilled?: ((value: {id:string;name:string;}[]) =>void| PromiseLike<void>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<void>Attaches callbacks for the resolution and/or rejection of the Promise.@param onfulfilled The callback to execute when the Promise is resolved.@param onrejected The callback to execute when the Promise is rejected.@returns A Promise for the completion of which ever callback is executed.people: {
id: string;
name: string;
}[]let people: {id:string;name:string;}[]let people: {id:string;name:string;}[]AbortSignal.aborted: booleaninterfaceAbortSignal {aborted:boolean;}interfaceAbortSignal {aborted:boolean;}The aborted read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false). MDN ReferenceParentNode.replaceChildren(...nodes: (Node | string)[]): voidParentNode.replaceChildren(...nodes: (Node | string)[]): voidParentNode.replaceChildren(...nodes: (Node | string)[]): voidReplace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. MDN ReferenceArray<{ id: string; name: string; }>.map<HTMLOptionElement>(callbackfn: (value: {
id: string;
name: string;
}, index: number, array: {
id: string;
name: string;
}[]) => HTMLOptionElement, thisArg?: any): HTMLOptionElement[]Array<{ id: string; name: string; }>.map<HTMLOptionElement>(callbackfn: (value: {id:string;name:string;}, index:number, array: {id:string;name:string;}[]) => HTMLOptionElement, thisArg?: any): HTMLOptionElement[]Array<{ id: string; name: string; }>.map<HTMLOptionElement>(callbackfn: (value: {id:string;name:string;}, index:number, array: {id:string;name:string;}[]) => HTMLOptionElement, thisArg?: any): HTMLOptionElement[]Calls a defined callback function on each element of an array, and returns an array that contains the results.@param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.@param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.person: {
id: string;
name: string;
}let person: {id:string;name:string;}let person: {id:string;name:string;}const option: HTMLOptionElementconstoption:HTMLOptionElementconstoption:HTMLOptionElementDocument.createElement<"option">(tagName: "option", options?: ElementCreationOptions): HTMLOptionElement (+2 overloads)Document.createElement<"option">(tagName: "option", options?: ElementCreationOptions): HTMLOptionElement (+2 overloads)Document.createElement<"option">(tagName: "option", options?: ElementCreationOptions): HTMLOptionElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceHTMLOptionElement.value: stringinterfaceHTMLOptionElement {value:string;}interfaceHTMLOptionElement {value:string;}The value property of the HTMLOptionElement interface represents the value of the option element as a string, or the empty string if no value is set. MDN ReferenceHTMLOrSVGElement.dataset: DOMStringMapinterfaceHTMLOrSVGElement {dataset:DOMStringMap;}interfaceHTMLOrSVGElement {dataset:DOMStringMap;}MDN ReferenceDOMStringMap[string]: string | undefinedDOMStringMap[string]: string |undefinedDOMStringMap[string]: string |undefinedStable identity used by operations, history, and collaboration rebase.API reference →Promise<void>.catch<void>(onrejected?: ((reason: any) => void | PromiseLike<void>) | null | undefined): Promise<void>Promise<void>.catch<void>(onrejected?: ((reason:any) =>void| PromiseLike<void>) |null|undefined): Promise<void>Promise<void>.catch<void>(onrejected?: ((reason:any) =>void| PromiseLike<void>) |null|undefined): Promise<void>Attaches a callback for only the rejection of the Promise.@param onrejected The callback to execute when the Promise is rejected.@returns A Promise for the completion of the callback.error: unknownlet error:unknownlet error:unknownvar DOMException: {
new (message?: string, name?: string): DOMException;
prototype: DOMException;
readonly INDEX_SIZE_ERR: 1;
readonly DOMSTRING_SIZE_ERR: 2;
readonly HIERARCHY_REQUEST_ERR: 3;
readonly WRONG_DOCUMENT_ERR: 4;
readonly INVALID_CHARACTER_ERR: 5;
readonly NO_DATA_ALLOWED_ERR: 6;
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
readonly NOT_FOUND_ERR: 8;
readonly NOT_SUPPORTED_ERR: 9;
readonly INUSE_ATTRIBUTE_ERR: 10;
readonly INVALID_STATE_ERR: 11;
readonly SYNTAX_ERR: 12;
readonly INVALID_MODIFICATION_ERR: 13;
readonly NAMESPACE_ERR: 14;
readonly INVALID_ACCESS_ERR: 15;
... 9 more ...;
readonly DATA_CLONE_ERR: 25;
}var DOMException: {new (message?:string, name?:string):DOMException;prototype:DOMException;readonlyINDEX_SIZE_ERR:1;readonlyDOMSTRING_SIZE_ERR:2;readonlyHIERARCHY_REQUEST_ERR:3;readonlyWRONG_DOCUMENT_ERR:4;readonlyINVALID_CHARACTER_ERR:5;readonlyNO_DATA_ALLOWED_ERR:6;readonlyNO_MODIFICATION_ALLOWED_ERR:7;readonlyNOT_FOUND_ERR:8;readonlyNOT_SUPPORTED_ERR:9;readonlyINUSE_ATTRIBUTE_ERR:10;readonlyINVALID_STATE_ERR:11;readonlySYNTAX_ERR:12;readonlyINVALID_MODIFICATION_ERR:13;readonlyNAMESPACE_ERR:14;readonlyINVALID_ACCESS_ERR:15;...9more ...;readonlyDATA_CLONE_ERR:25;}var DOMException: {new (message?:string, name?:string):DOMException;prototype:DOMException;readonlyINDEX_SIZE_ERR:1;readonlyDOMSTRING_SIZE_ERR:2;readonlyHIERARCHY_REQUEST_ERR:3;readonlyWRONG_DOCUMENT_ERR:4;readonlyINVALID_CHARACTER_ERR:5;readonlyNO_DATA_ALLOWED_ERR:6;readonlyNO_MODIFICATION_ALLOWED_ERR:7;readonlyNOT_FOUND_ERR:8;readonlyNOT_SUPPORTED_ERR:9;readonlyINUSE_ATTRIBUTE_ERR:10;readonlyINVALID_STATE_ERR:11;readonlySYNTAX_ERR:12;readonlyINVALID_MODIFICATION_ERR:13;readonlyNAMESPACE_ERR:14;readonlyINVALID_ACCESS_ERR:15;...9more ...;readonlyDATA_CLONE_ERR:25;}The DOMException interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. MDN Reference An abnormal event (called an exception) that occurs when calling a method or accessing a property of a web APIerror: DOMExceptionlet error:DOMExceptionlet error:DOMExceptionDOMException.name: stringinterfaceDOMException {name:string;}interfaceDOMException {name:string;}The name read-only property of the one of the strings associated with an error name. MDN ReferenceAPI reference →var Promise: PromiseConstructorvar Promise:PromiseConstructorvar Promise:PromiseConstructorRepresents the completion of an asynchronous operationPromiseConstructor.resolve(): Promise<void> (+2 overloads)PromiseConstructor.resolve(): Promise<void> (+2 overloads)PromiseConstructor.resolve(): Promise<void> (+2 overloads)Creates a new resolved promise.@returns A resolved promise.ChildNode.remove(): voidChildNode.remove(): voidChildNode.remove(): voidRemoves node. MDN Referenceconst SheetwriteGrid: <Id extends RowBridgeId = RowBridgeId>(props: SheetwriteGridProps<Id> & {
ref?: ForwardedRef<Grid>;
}) => ReactElementconstSheetwriteGrid: <IdextendsRowBridgeId=RowBridgeId,>(props:SheetwriteGridProps<Id> & {ref?:ForwardedRef<Grid>;},) =>ReactElementconstSheetwriteGrid: <IdextendsRowBridgeId=RowBridgeId,>(props:SheetwriteGridProps<Id> & {ref?:ForwardedRef<Grid>;},) =>ReactElementAdvanced framework component with inferred row-bridge identity.Exampleimport { SheetwriteGrid } from"@sheetwrite/react";importtype { Workbook } from"@sheetwrite/core";exportfunctionWorkbookView({ workbook }: { workbook:Workbook }) {return <SheetwriteGridworkbook={workbook} height={400} />;}See alsoSheetwrite *See also/docs/frameworks/react/API reference →ref?: ForwardedRef<Grid> | undefinedref?: ForwardedRef<Grid>|undefinedref?: ForwardedRef<Grid>|undefinedAPI reference →const gridRef: Grid | nullconstgridRef:Grid|nullconstgridRef:Grid|nullAPI reference →const workbook: Workbookconstworkbook:Workbookconstworkbook:WorkbookLive workbook schema adopted by the store and updated by document operations.API reference →const data: ColumnarDataconstdata:ColumnarDataconstdata:ColumnarDataEager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →assignee: CellEditorlet assignee:CellEditorlet assignee:CellEditorAPI reference →const assigneeAutocomplete: CellEditorconstassigneeAutocomplete:CellEditorconstassigneeAutocomplete:CellEditorAPI reference →GridAdapterEventHandlers<RowBridgeId>.onCommandStateChange?: ((event: GridEvents["command-state-change"]) => void) | undefinedinterfaceGridAdapterEventHandlers<RowBridgeId> {onCommandStateChange?:| ((event:GridEvents["command-state-change"]) =>void)|undefined;}interfaceGridAdapterEventHandlers<RowBridgeId,> {onCommandStateChange?:| ((event:GridEvents["command-state-change"],) =>void)|undefined;}Receives observable undo/redo and formatting command state.API reference →states: Readonly<Record<GridCommandName, GridCommandState>>let states:Readonly<Record<GridCommandName, GridCommandState>>let states:Readonly<Record<GridCommandName,GridCommandState>>const setCommandStates: (states: Readonly<Record<GridCommandName, GridCommandState>>) => voidconstsetCommandStates: (states:Readonly<Record<GridCommandName, GridCommandState>>,) =>voidconstsetCommandStates: (states:Readonly<Record<GridCommandName,GridCommandState>>,) =>voidconst SheetwriteGrid: Component<SheetwriteGridProps<RowBridgeId>, {}, "grid">constSheetwriteGrid:Component<SheetwriteGridProps<RowBridgeId>,{},"grid">constSheetwriteGrid:Component<SheetwriteGridProps<RowBridgeId>,{},"grid">Advanced framework component for workbook data or datasource input.API reference →grid: Gridlet grid:Gridlet grid:GridThe imperative core grid this controller owns.API reference →workbook: Workbooklet workbook:Workbooklet workbook:WorkbookLive workbook schema adopted by the store and updated by document operations.API reference →data: ColumnarDatalet data:ColumnarDatalet data:ColumnarDataEager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →event: GridCommandStateChangeEventlet event:GridCommandStateChangeEventlet event:GridCommandStateChangeEventAPI reference →interface GridEventsinterfaceGridEventsinterfaceGridEventsPayload map for events emitted by a Grid.API reference →let commandStates: Readonly<Record<GridCommandName, GridCommandState>>let commandStates:Readonly<Record<GridCommandName, GridCommandState>>let commandStates:Readonly<Record<GridCommandName,GridCommandState>>GridCommandStateChangeEvent.states: Readonly<Record<GridCommandName, GridCommandState>>interfaceGridCommandStateChangeEvent {states:Readonly<Record<GridCommandName, GridCommandState>>;}interfaceGridCommandStateChangeEvent {states:Readonly<Record<GridCommandName,GridCommandState>>;}