@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
38 lines (37 loc) • 941 B
TypeScript
import { BaseContext, GridCell } from '../../types';
/**
* Options for managing AdapTable Notes
*/
export interface NoteOptions<TData = any> {
/**
* Whether a cell can contain Notes
*/
isCellNotable?: (context: NotableCellContext) => boolean;
/**
* Date Format string for Notes timestamp
*
* @defaultValue 'dd-MM-yyyy HH:mm:ss'
*/
dateFormat?: string | (() => string);
/**
* Show the Close Button in the Notes Popup
*
* @defaultValue true
*/
showPopupCloseButton?: boolean;
/**
* Whether to show Notes by hovering (default) or via context menu
*
* @defaultValue 'hover'
*/
showNoteAction?: 'hover' | 'menu';
}
/**
* Context used when determining if a Note can be added to a Cell
*/
export interface NotableCellContext extends BaseContext {
/**
* Grid Cell in AdapTable which has been clicked
*/
gridCell: GridCell;
}