Quick implementation of typed html input editor for ag-Grid.
npm install --save ag-grid-typed-editor
The goal of this package is to provide an easy way to have html typed input for agGrid editors.
This package provide a new cellEditor named: InputParameterizedCellEditor
.
You can configure and customize the cell and behavior with the following cellEditorParams
:
useFormatter
: (boolean = false
) used when the cell value needs formatting prior to editing, such as when using
reference data and you want to display text rather than code.inputAttrs
: (object = {type: 'text'}
)
type
: (string: required
) The name of the html type you want, must be one of:
attrs
: (object
) All the attrs who are valid for the targeted html type.import {InputParameterizedCellEditor} from './ag-grid-typed-editor';
...
{
headerName: 'A number',
field: 'somenumber',
editable: true,
resizable: true,
cellEditor: InputParameterizedCellEditor,
cellEditorParams: {
inputAttrs: {
type: 'number',
attrs: {
min: 1,
max: Number.MAX_SAFE_INTEGER,
}
},
},
}
This project is onto MIT license see LICENSE file.