@sheetwrite/reactvariable
Advanced framework component with inferred row-bridge identity.
- Package
@sheetwrite/react- Source
packages/react/src/index.tsx#L391
Declaration
function SheetwriteGrid<Id extends RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference → = RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference →>( props: SheetwriteGridPropsinterface SheetwriteGridProps<
Id extends RowBridgeId = RowBridgeId,
> {
rowBridge?: RowBridge<Id>;
onRowDelta?: RowBridgeHandler<Id>;
onMutationRejected?: GridAdapterEventHandlers["onMutationRejected"];
onRendererFallback?: GridAdapterEventHandlers["onRendererFallback"];
onDatasourceError?: GridAdapterEventHandlers["onDatasourceError"];
onExportError?: GridAdapterEventHandlers["onExportError"];
onReady?: GridAdapterEventHandlers["onReady"];
className?: string;
style?: CSSProperties;
fallback?: ReactNode;
height?: number | string;
fill?: true;
// … 33 more lines — see the API reference
}interface SheetwriteGridProps<
Id extends RowBridgeId = RowBridgeId,
> {
rowBridge?: RowBridge<Id>;
onRowDelta?: RowBridgeHandler<Id>;
onMutationRejected?: GridAdapterEventHandlers["onMutationRejected"];
onRendererFallback?: GridAdapterEventHandlers["onRendererFallback"];
onDatasourceError?: GridAdapterEventHandlers["onDatasourceError"];
onExportError?: GridAdapterEventHandlers["onExportError"];
onReady?: GridAdapterEventHandlers["onReady"];
className?: string;
style?: CSSProperties;
fallback?: ReactNode;
height?: number | string;
fill?: true;
// … 33 more lines — see the API reference
}interface SheetwriteGridProps<
Id extends RowBridgeId =
RowBridgeId,
> {
rowBridge?: RowBridge<Id>;
onRowDelta?: RowBridgeHandler<Id>;
onMutationRejected?: GridAdapterEventHandlers["onMutationRejected"];
onRendererFallback?: GridAdapterEventHandlers["onRendererFallback"];
onDatasourceError?: GridAdapterEventHandlers["onDatasourceError"];
onExportError?: GridAdapterEventHandlers["onExportError"];
onReady?: GridAdapterEventHandlers["onReady"];
className?: string;
style?: CSSProperties;
fallback?: ReactNode;
height?: number | string;
fill?: true;
workbook: Workbook;
data?: ColumnarData;
datasource?: DataSource;
// … 58 more lines — see the API reference
}Advanced framework adapter props for workbook data or datasource ownership.API reference →<Id> & { ref?: ForwardedRef<Gridinterface Grid {
readonly store: Store;
readonly actions: GridActions;
getRuntimeResourceSnapshot(
operation: RuntimeResourceOperation,
phase: RuntimeResourcePhase,
runtime?: RuntimeMemoryObservation,
): RuntimeResourceSnapshot;
getCommandState(command: GridCommandName): GridCommandState;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
// … 120 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
getRuntimeResourceSnapshot(
operation: RuntimeResourceOperation,
phase: RuntimeResourcePhase,
runtime?: RuntimeMemoryObservation,
): RuntimeResourceSnapshot;
getCommandState(command: GridCommandName): GridCommandState;
setActiveSheet(id: SheetId): void;
scrollToCell(addr: CellAddress): void;
getCellAtPoint(
clientX: number,
clientY: number,
): CellAddress | null;
// … 120 more lines — see the API reference
}interface Grid {
readonly store: Store;
readonly actions: GridActions;
getRuntimeResourceSnapshot(
operation: RuntimeResourceOperation,
phase: RuntimeResourcePhase,
runtime?: RuntimeMemoryObservation,
): RuntimeResourceSnapshot;
getCommandState(
command: GridCommandName,
): GridCommandState;
setActiveSheet(
id: SheetId,
): void;
scrollToCell(
addr: CellAddress,
): void;
getCellAtPoint(
clientX: number,
// … 255 more lines — see the API reference
}Imperative grid handle for document commands, events, rendering, and teardown.API reference →>; },): ReactElement