@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
55 lines (54 loc) • 1.43 kB
TypeScript
import { AdaptableFormData } from '../../AdaptableState/Common/AdaptableForm';
import { IRowNode } from 'ag-grid-enterprise';
import { BaseContext } from '../../types';
/**
* Info passed into RowFormSubmitted Event - can be `CreatedRowInfo`, `EditedRowInfo` or `DeletedRowInfo`
*/
export type RowFormSubmittedInfo<TData = any> = CreatedRowInfo<TData> | EditedRowInfo<TData> | DeletedRowInfo<TData>;
/**
* Info passed into RowFormSubmitted Event for Created Rows
*/
export interface CreatedRowInfo<TData = any> extends BaseContext {
/**
* Specifies its a Created Row Form
*/
type: 'rowCreated';
/**
* Data entered in the Form
*/
formData: AdaptableFormData;
/**
* Node being added
*/
rowNode?: IRowNode<TData>;
}
/**
* Info passed into RowFormSubmitted Event for Edited Rows
*/
export interface EditedRowInfo<TData = any> extends BaseContext {
/**
* Specifies its an Edited Row Form
*/
type: 'rowEdited';
/**
* Data entered in the Form
*/
formData: AdaptableFormData;
/**
* Node being edited
*/
rowNode: IRowNode<TData>;
}
/**
* Info passed into RowFormSubmitted Event for Deleted Rows
*/
export interface DeletedRowInfo<TData = any> extends BaseContext {
/**
* Specifies its a Deleted Row Form
*/
type: 'rowDeleted';
/**
* Node being deleted
*/
rowNode: IRowNode<TData>;
}