@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
33 lines (32 loc) • 1.01 kB
TypeScript
import { IRowNode } from 'ag-grid-enterprise';
import { AdaptableOptions, BaseContext } from '../types';
/**
* Plugin Options used when creating a Master / Detail grid - passed into the plugin as the only argument.
*/
export interface MasterDetailPluginOptions {
/**
* `AdaptableOptions` used in Detail Grids; all share same behaviour & State
*/
detailAdaptableOptions: AdaptableOptions;
/**
* Function called when a Detail Grid is initialised, receives context including Adaptable Api
*/
onDetailInit?: (context: DetailInitContext) => void;
}
/**
* Context passed to Detail Grids when using Master Detail Plugin
*/
export interface DetailInitContext extends BaseContext {
/**
* Row Node in the Master Grid that was opened
*/
rowNode: IRowNode;
/**
* The data in the Master Grid Row that was opened
*/
data: IRowNode['data'];
/**
* Primary Key Value of Master Grid Row that was opened
*/
primaryKeyValue: unknown;
}