DataImportOptions
Options for managing the Data Import function
export interface DataImportOptions<T = Record<string,Properties
| Property | Description |
|---|---|
| fileHandlers | Custom File Handlers to use for Data Import |
| handleImportedData | Function to handle the Imported Data and apply it to the Grid. If not provided then the Data will be applied to the Grid automatically. |
| textHandler | Handles Importing Data using text |
| validate | Function to validate the Imported Data |
| _getPrimaryKeyValue | Function to get the Primary Key value for a data row (defaults to value of the primaryKey column) |
| _preprocessRowData | Function to pre-process the data before it is imported |
Property Details
fileHandlers
Custom File Handlers to use for Data Import
fileHandlers?: DataImportFileHandler<T>[];Property Value
handleImportedData
Function to handle the Imported Data and apply it to the Grid. If not provided then the Data will be applied to the Grid automatically.
handleImportedData?: (context: HandleImportedDataContext<T>) => Promise<void | HandleImportedDataResolution>;Property Value
(context:HandleImportedDataContext<T>) => Promise<void |HandleImportedDataResolution>
textHandler
Handles Importing Data using text
textHandler?: (text: string) => T[] | Promise<T[]>;Property Value
(text: string) => T[] | Promise<T[]>
validate
Function to validate the Imported Data
validate?: (context: DataImportValidateContext<T>) => DataImportValidationError[] | undefined;Property Value
(context:DataImportValidateContext<T>) =>DataImportValidationError[] | undefined
_getPrimaryKeyValue
Function to get the Primary Key value for a data row (defaults to value of the primaryKey column)
It might change in a future version
_getPrimaryKeyValue?: (context: GetPrimaryKeyValueContext<T>) => string | number;Property Value
(context:GetPrimaryKeyValueContext<T>) => string | number
_preprocessRowData
Function to pre-process the data before it is imported
It might change in a future version
_preprocessRowData?: (context: PreprocessRowDataContext<T>) => Record<string, any>;Property Value
(context:PreprocessRowDataContext<T>) => Record<string, any>