synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
31 lines • 1.1 kB
TypeScript
import { DataGridRow, GridModel, ReplicaSelectionModel } from '@/components/DataGrid/DataGridTypes';
import { SchemaPropertiesMap } from '@/utils/jsonschema/getSchemaPropertyInfo';
/**
* Represents a change operation on the GridModel.
*/
export type ModelChange = {
type: 'CREATE';
rowIndex: number;
rowData: DataGridRow;
} | {
type: 'DELETE';
rowIndex: number;
count?: number;
} | {
type: 'UPDATE';
rowIndex: number;
updatedData: DataGridRow;
} | {
type: 'SET_SELECTION';
replicaId: string;
selection: ReplicaSelectionModel;
};
export declare function getDefaultValueForProperty(row: DataGridRow, property: string, schemaPropertyInfo: SchemaPropertiesMap): string | number | boolean | null | undefined;
/**
* Applies a single change operation (create, delete, or update) to the GridModel.
*
* @param model - The grid model to modify
* @param change - The change to apply
*/
export declare function applyModelChange(model: GridModel, change: ModelChange, schemaPropertyInfo: SchemaPropertiesMap): void;
//# sourceMappingURL=applyModelChange.d.ts.map