Column Def
Javascript Data Grid
Provides the display order and properties to your columns including a display name and a default width. A Column Def is not required to make the data grid work.
Column Def interface
- column: Column name in your array of data
- displayName: The name to display in the column header
- width: Default column width
- sortable: Set to false explicitly to disable sorting for a given column
- hideFilter: Set to true to disable filters for a single column
The below colDef provides the column def for the official javascript data grid demo.
let colDef = [
{ column: 'stimulus img id', displayName: "ID", width: 150},
{ column: 'prompt', displayName: "AI Prompt", width: 600},
{ column: 'category', width: 160},
{ column: 'width', width: 160},
{ column: 'height', width: 160},
{ column: 'extension', width: 160},
];deebo.methods.setColumnDef(colDef)Where colDef is an array of objects in which each object in the array should have at least a column property matching the properties of your data. You can add a displayName (string) for the column and a default width (number) in px.