UNPKG

ag-grid-community

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

51 lines (50 loc) 2.03 kB
import type { Column } from './iColumn'; import type { IRowNode } from './iRowNode'; export type EditInputEvents = KeyboardEvent | MouseEvent | null | undefined; export type EditNavOnValidationResult = 'block-stop' | 'revert-continue' | 'continue'; export type EditSource = 'api' | 'ui' | 'paste' | 'rangeSvc' | 'fillHandle' | 'cellClear' | 'edit' | 'bulk'; /** * Specifies how to resolve the cell value when edits are pending. * - `'edit'`: Returns the current editing value, including live editor typing and pending batch values. This is the default value. * - `'batch'`: Returns pending batch values but excludes live editor typing (useful for dependent calculations in valueGetters) * - `'data'`: Returns the actual stored data value, ignoring all edit state */ export type CellValueResolveFrom = 'edit' | 'batch' | 'data'; export interface StartEditWithPositionParams extends StartEditParams { position: Required<EditPosition>; } export type StartEditParams = { startedEdit?: boolean | null; event?: EditInputEvents; source?: EditSource; ignoreEventKey?: boolean; silent?: boolean; continueEditing?: boolean; /** If true, skip checking if the cell is editable by invoking the editable user callback */ editable?: boolean; }; export type StopEditParams = { event?: EditInputEvents; cancel?: boolean; commit?: boolean; source?: EditSource; forceStop?: boolean; forceCancel?: boolean; suppressNavigateAfterEdit?: boolean; }; export type IsEditingParams = { checkSiblings?: boolean; withOpenEditor?: boolean; }; export type EditRowPosition = { rowNode?: IRowNode; }; export interface EditPosition extends EditRowPosition { column?: Column; } export interface _SetEditingCellsParams { /** Update existing cells, omit or set `false` to replace currently editing cells. */ update?: boolean; /** Force the cells that are being marked as edited to be refreshed and only these cells not others */ forceRefreshOfEditCellsOnly?: boolean; }