import type { SortDirection } from '../../../Types/SortDirection'; import type { TableCellElement } from '../Table/TableCellElement'; /** * Represents the `IDataTableColumnDefinition` interface. * * @public */ export interface IDataTableColumnDefinition { key: string; title?: string; path?: string; hidden?: string; sortable?: boolean; sortDirection?: SortDirection | 'none'; } /** * Defines a column in the grid * * @public */ export interface IColumnDefinition { /** * Identifies the data item to be displayed in this column * (i.e. how the data item is labelled in each row) */ columnDataKey: string; /** * Sets the css grid-column property on the cell which controls its placement in * the parent row. If left unset the cells will set this value to match the index * of their column in the parent collection of ColumnDefinitions. */ gridColumn?: string; /** * Column title, if not provided columnDataKey is used as title */ title?: string; /** * Header cell template */ headerCellTemplate?: () => string; /** * Callback function that returns the element to focus in a custom cell. * When headerCellInternalFocusQueue is false this function is called when the cell is first focused * to immediately move focus to a cell element, for example a cell that is a checkbox could move * focus directly to the checkbox. * When headerCellInternalFocusQueue is true this function is called when the user hits Enter or F2 */ headerCellFocusTargetCallback?: (cell: TableCellElement) => HTMLElement; /** * cell template */ cellTemplate?: () => string; /** * Whether the cell has an internal focus queue */ cellInternalFocusQueue?: boolean; /** * Callback function that returns the element to focus in a custom cell. * When cellInternalFocusQueue is false this function is called when the cell is first focused * to immediately move focus to a cell element, for example a cell that is a checkbox could move * focus directly to the checkbox. * When cellInternalFocusQueue is true this function is called when the user hits Enter or F2 */ cellFocusTargetCallback?: (cell: TableCellElement) => HTMLElement; /** * Whether this column is the row header */ isRowHeader?: boolean; } //# sourceMappingURL=IDataTableColumnDefinition.d.ts.map