Skip to content

HeaderSlotProps

Since v1.9.0

Slot context for #header slot in TbwGridColumn. Gives the consumer full control over the header cell label — sort icons and filter buttons are NOT added automatically; use the renderSortIcon and renderFilterButton helpers to opt in. Resize handles are appended automatically by the grid for resizable columns.

<TbwGridColumn field="status" sortable>
<template #header="{ value, sortState, renderSortIcon }">
<div class="custom-header">
<span>{{ value }}</span>
<component :is="renderSortIcon()" v-if="sortState" />
</div>
</template>
</TbwGridColumn>
PropertyTypeDescription
columnColumnConfig<TRow>Column configuration reference.
valuestringThe header text (from column.header or column.field).
sortStatedesc | asc | unknownCurrent sort state for this column.
filterActivebooleanWhether the column has an active filter.
cellElHTMLElementThe header cell DOM element being rendered into.
renderSortIcon() => HTMLElement | unknownRender the standard sort indicator icon. Returns null if not sortable.
renderFilterButton() => HTMLElement | unknownRender the standard filter button. Returns null if filtering is not active for this column.
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt