Skip to Content

ColDefPrime type

Tip

This API reference is automatically generated from the source code  of the @jsoc/react-grid-prime  package.

View Declaration

export type ColDefPrime = ColumnProps;

Fields

NameTypeDefault
align"left" | "right" | "center" | null | undefined

Aligns the content of the column, valid values are left, right and center.

alignFrozen"left" | "right" | undefined

Position of a frozen column, valid values are left and right.

alignHeader"left" | "right" | "center" | null | undefined

Aligns the header of the column, valid values are left, right and center.

bodyReactNode | ((data: any, options: ColumnBodyOptions) => ReactNode)

Body content of the column.

bodyClassNamestring | ((data: any, options: ColumnBodyOptions) => string)

Style class of the body. If using a function must return a string.

bodyStyleCSSProperties | undefined

Inline style of the body.

cellEditValidateOnCloseboolean | undefined

When enabled and cellEditorValidator is set, force to call cellEditorValidator before cell editor is closed. If cellEditorValidator returns false, editor stays open.

false
cellEditValidatorEventstring | undefined

Event to trigger the validation, possible values are “click” and “blur”.

click
childrenReactNode

Used to get the child elements of the component.

ptColumnPassThroughOptions

Uses to pass attributes to DOM elements inside the component.

ptOptionsPassThroughOptions

Used to configure passthrough(pt) options of the component.

unstyledboolean

When enabled, it removes component related styles in the core.

false
classNamestring | undefined

Style class of the component.

colSpannumber | undefined

Number of columns to span for grouping.

columnKeystring | undefined

Identifier of a column if field property is not defined. Only utilized by reorderableColumns feature at the moment.

dataTypestring | undefined

Depending on the dataType of the column, suitable match modes are displayed.

editorReactNode | ((options: ColumnEditorOptions) => ReactNode)

Function to provide the cell editor input.

excludeGlobalFilterboolean | undefined

Whether to exclude from global filtering or not.

false
expanderboolean | ((data: any, options: ColumnBodyOptions) => boolean)

Displays an icon to toggle row expansion.

false
exportableboolean | undefined

Defines whether the column is exported or not.

true
exportFieldstring | undefined

Property of a row data used for exporting, defaults to field.

exportHeaderstring | undefined

Custom export header of the column to be exported.

fieldstring | undefined

Property of a row data.

filterboolean | undefined

Defines if a column can be filtered.

false
filterApplyReactNode | ((options: ColumnFilterApplyTemplateOptions) => ReactNode)

Template of apply element in menu.

filterClearReactNode | ((options: ColumnFilterClearTemplateOptions) => ReactNode)

Template of clear element in menu.

filterElementReactNode | ((options: ColumnFilterElementTemplateOptions) => ReactNode)

Element for custom filtering.

filterFieldstring | undefined

Property of a row data used for filtering, defaults to field.

filterFooterReactNode | ((options: ColumnFilterFooterTemplateOptions) => ReactNode)

Template of footer element in menu.

filterHeaderReactNode | ((options: ColumnFilterHeaderTemplateOptions) => ReactNode)

Template of header element in menu.

filterHeaderClassNamestring | undefined

Style class of the filter header.

filterHeaderStyleCSSProperties | undefined

Inline style of the filter header.

filterMatchModestring | undefined

Defines filterMatchMode; “startsWith”, “contains”, “endsWith”, “equals”, “notEquals”, “in”, “notIn”, “lt”, “lte”, “gt”, “gte” and “custom”.

filterMatchModeOptionsColumnFilterMatchModeOptions[]

An array of label-value pairs to override the global match mode options.

filterMaxLengthnumber | undefined

Specifies the maximum number of characters allowed in the filter element.

filterMenuClassNamestring | undefined

Style class of the column filter overlay.

filterMenuStyleCSSProperties | undefined

Inline style of the column filter overlay.

filterPlaceholderstring | undefined

Defines placeholder of the input fields.

filterTypestring | undefined

Type of the filter input field.

text
footerClassNamestring | undefined

Style class of the footer.

footerStyleCSSProperties | undefined

Inline style of the footer.

frozenboolean | undefined

Whether the column is fixed in horizontal scrolling or not.

false
headerClassNamestring | undefined

Style class of the header.

headerStyleCSSProperties | undefined

Inline style of the header.

headerTooltipstring | undefined

Content of the header tooltip.

headerTooltipOptionsTooltipOptions | undefined

Configuration of the header tooltip, refer to the tooltip documentation for more information.

hiddenboolean | undefined

Whether the column is rendered.

false
maxConstraintsnumber | undefined

Maximum number of constraints for a column filter.

2
reorderableboolean | undefined

Used to defined reorderableColumns per column when reorderableColumns of table is enabled, defaults to value of reorderableColumns.

resizeableboolean | undefined

Used to defined resizeableColumns per column when resizeableColumns of table is enabled, defaults to value of resizeableColumns.

rowEditorboolean | ((data: any, options: ColumnBodyOptions) => boolean)

Displays icons to edit row.

false
rowReorderboolean | undefined

Whether this column displays an icon to reorder the rows.

false
rowReorderIconIconType<ColumnProps>

Icon of the drag handle to reorder rows.

rowSpannumber | undefined

Number of rows to span for grouping.

selectionMode"single" | "multiple" | undefined

Specifies the selection mode, valid values are “single”, “multiple”, “radiobutton” and “checkbox”.

showAddButtonboolean | undefined

When enabled, a button is displayed to add more rules.

true
showApplyButtonboolean | undefined

Displays a button to apply the column filtering.

true
showClearButtonboolean | undefined

Displays a button to clear the column filtering.

true
showFilterMatchModesboolean | undefined

Whether to show the match modes selector.

true
showFilterMenuboolean | undefined

Whether to display the filter overlay.

true
showFilterMenuOptionsboolean | undefined

Whether to show the match modes selector and match operator selector.

true
showFilterOperatorboolean | undefined

When enabled, match all and match any operator selector is displayed.

true
sortFieldstring | undefined

Name of the field to sort data by default.

sortableboolean | undefined

Defines if a column is sortable.

false
sortableDisabledboolean | undefined

When enabled, the data of columns with this property cannot be sorted or changed by the user.

false
styleCSSProperties | undefined

Inline style of the component.

cellEditValidator(event: ColumnEvent) => boolean

Validator function to validate the cell input value.

filterFunction(value: any, filter: any, filterLocale: string, params: ColumnFilterEvent) => void

Custom filter function.

onBeforeCellEditHide(event: ColumnEvent) => void

Callback to invoke before the cell editor is hidden.

onBeforeCellEditShow(event: ColumnEvent) => void

Callback to invoke before the cell editor is shown. To prevent editor from showing return false or originalEvent.preventDefault().

onCellEditCancel(event: ColumnEvent) => void

Callback to execute when editor is cancelled.

onCellEditComplete(event: ColumnEvent) => void

Callback to execute when editor is submitted.

onCellEditInit(event: ColumnEvent) => void

Callback to invoke when cell edit is initiated. To prevent editor from showing return false or originalEvent.preventDefault().

onFilterApplyClick(event: ColumnFilterApplyClickEvent) => void

Callback to invoke when the apply button is clicked.

onFilterClear() => void

Callback to invoke when the filter meta is cleared.

onFilterConstraintAdd(event: ColumnFilterConstraintAddEvent) => void

Callback to invoke when a new constraint is added.

onFilterConstraintRemove(event: ColumnFilterConstraintRemoveEvent) => void

Callback to invoke when a constraint is removed.

onFilterMatchModeChange(event: ColumnFilterMatchModeChangeEvent) => void

Callback to invoke when the match mode option is changed.

onFilterOperatorChange(event: ColumnFilterOperatorChangeEvent) => void

Callback to invoke when the filter operator option is changed.

sortFunction(event: ColumnSortEvent) => void

Sort function for custom sorting.