GridCrud.columns
function · packages/data-grid/src/crud.ts:25
columns<
Key extends string,
Row extends {
readonly [K in Key]: unknown
},
Options extends {
readonly [K in Key]?: ColumnOptions<Row>
},
>(
list: {
readonly columns: ReadonlyArray<DisplayColumn<Key>>
readonly Row: Row
},
options?: {
readonly words?: DisplayWords
readonly columns?: Options
},
): Columns<
Row,
{
readonly [K in Key]: ColumnSpec<Row, string> & Options[K]
}
>The grid's columns for a list: one per listed member, keyed by its member
key, headed by its label, its value the member's text as its Display says
it. A member whose Display is hidden (usually the id) starts hidden: it is
read, and can be shown, but is not drawn. columns adds what only the
grid knows to a member's column: pinning, widths, edit, or another
header; what it gives wins over what the list says.