Built-in editors
View sourcebc-grid ships nine editors covering every common ERP cell type. Each is a factory that returns a typed BcCellEditor — drop one onto a column and you have a working in-place editor.
The full set
- createTextEditor — single-line text input.
- createNumberEditor — locale-aware numeric input with decimal control, step, min/max. Rejects non-numeric input.
- createDateEditor / createDatetimeEditor / createTimeEditor — calendar / clock picker with keyboard nav. ISO-string commit value.
- createSelectEditor — single-select dropdown (cmdk-backed Combobox under the hood). Options static or async.
- createMultiSelectEditor — same shape, multi-value commit. Selected chips render in the cell.
- createAutocompleteEditor — async fetch on every keystroke, debounced. The demo above wires a Promise-based fetch over a static city list.
- createCheckboxEditor — boolean toggle. Commits on click, no Tab needed.
Why factories
Each editor is created by a factory function so options are baked in per-column. Same factory, two columns, different decimal counts — each column has its own settings. createNumberEditor({ decimals: 2 }) is independent from createNumberEditor({ decimals: 0 }). Default-export aliases like textEditor exist for the zero-config case (textEditor === createTextEditor()).
Custom editors
Build your own by writing a component that matches BcCellEditor<TRow, TValue> and exposing the same { Component, kind } shape. The grid handles mount, focus, escape, commit, and cleanup — you handle render and validation. Recipes: packages/bc-grid/docs/recipes/shadcn-editors.md.