Simple framework adapter props for columns and default row objects.
- Package
@sheetwrite/svelte- Source
packages/svelte/src/props.ts#L57
Declaration
export type SheetwriteProps<Row extends Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →>> = Omit< SheetwriteGridPropsinterface SheetwriteGridProps extends Omit<
HTMLAttributes<HTMLDivElement>,
keyof GridAdapterEventHandlers | "children"
> {
className?: string;
style?: CSSProperties;
fallback?: ReactNode;
height?: number | string;
fill?: true;
workbook: Workbook;
data?: ColumnarData;
datasource?: DataSource;
datasourceStorage?: DataSourceStorageOptions;
renderer?: "canvas" | "worker";
workerUrl?: string | URL;
// … 21 more lines — see the API reference
}interface SheetwriteGridProps extends Omit<
HTMLAttributes<HTMLDivElement>,
keyof GridAdapterEventHandlers | "children"
> {
className?: string;
style?: CSSProperties;
fallback?: ReactNode;
height?: number | string;
fill?: true;
workbook: Workbook;
data?: ColumnarData;
datasource?: DataSource;
datasourceStorage?: DataSourceStorageOptions;
renderer?: "canvas" | "worker";
workerUrl?: string | URL;
// … 21 more lines — see the API reference
}interface SheetwriteGridProps extends Omit<
HTMLAttributes<HTMLDivElement>,
| keyof GridAdapterEventHandlers
| "children"
> {
className?: string;
style?: CSSProperties;
fallback?: ReactNode;
height?: number | string;
fill?: true;
workbook: Workbook;
data?: ColumnarData;
datasource?: DataSource;
datasourceStorage?: DataSourceStorageOptions;
renderer?: "canvas" | "worker";
workerUrl?: string | URL;
theme?: Partial<Theme>;
readOnly?: boolean;
protectionResolver?: ProtectionResolver;
// … 43 more lines — see the API reference
}Advanced framework adapter props for workbook data or datasource ownership.API reference →, "workbook" | "data" | "datasource" | "height" | "fill"> & GridSizePropstype GridSizeProps =
| { height: number | string; fill?: never }
| { fill: true; height?: never };type GridSizeProps =
| { height: number | string; fill?: never }
| { fill: true; height?: never };type GridSizeProps =
| {
height: number | string;
fill?: never;
}
| {
fill: true;
height?: never;
};Explicit width and height accepted by framework adapters.API reference → & { columns: readonly SimpleColumninterface SimpleColumn<Row extends Record<string, CellScalar>> {
key: keyof Row & string;
title: string;
width?: number;
type?: CellFormat;
numberFormat?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
}interface SimpleColumn<Row extends Record<string, CellScalar>> {
key: keyof Row & string;
title: string;
width?: number;
type?: CellFormat;
numberFormat?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
}interface SimpleColumn<
Row extends Record<
string,
CellScalar
>,
> {
key: keyof Row & string;
title: string;
width?: number;
type?: CellFormat;
numberFormat?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
}Column definition accepted by the adapters’ simple row-object API.API reference →<Row>[]; defaultRows: readonly Row[]; sheetName?: string; };