@linzjs/step-ag-grid
Version:
[](https://github.com/semantic-release/semantic-release) > Reusable [ag-grid](https://www.ag-grid.com/) component for LINZ / Toitū te whenua.
22 lines (20 loc) • 716 B
text/typescript
import { GenericCellEditorProps, GridCell } from '../GridCell';
import { GridFormMessage, GridFormMessageProps } from '../gridForm/GridFormMessage';
import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
import { ColDefT, GridBaseRow } from '../types';
export const GridPopoverMessage = <TData extends GridBaseRow, TValue = any>(
colDef: GenericCellColDef<TData, TValue>,
props: GenericCellEditorProps<GridFormMessageProps<TData>>,
): ColDefT<TData, TValue> =>
GridCell<TData, TValue, GridFormMessageProps<TData>>(
{
resizable: true,
...colDef,
singleClickEdit: true,
},
{
editor: GridFormMessage,
preventAutoEdit: true,
...props,
},
);