UNPKG

@linzjs/step-ag-grid

Version:

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) > Reusable [ag-grid](https://www.ag-grid.com/) component for LINZ / Toitū te whenua.

20 lines (17 loc) 868 B
import clsx from 'clsx'; import { GridBaseRow } from '../Grid'; import { ColDefT, GenericCellEditorProps, GridCell } from '../GridCell'; import { GridFormMultiSelectGrid, GridFormMultiSelectGridProps } from '../gridForm/GridFormMultiSelectGrid'; import { GenericCellColDef } from '../gridRender/GridRenderGenericCell'; export const GridPopoutEditMultiSelectGrid = <TData extends GridBaseRow, TValue = any>( colDef: GenericCellColDef<TData, TValue>, props: GenericCellEditorProps<GridFormMultiSelectGridProps<TData>>, ): ColDefT<TData, TValue> => GridCell<TData, TValue, GridFormMultiSelectGridProps<TData>>(colDef, { editor: GridFormMultiSelectGrid, ...props, editorParams: { ...(props.editorParams as GridFormMultiSelectGridProps<TData>), className: clsx('GridMultiSelect-containerMedium', props.editorParams?.className), }, });