Skip to content

useTableRowIndex

@astryxdesign/core v0.7.1 · useTableRowIndex

Usage ​

Hook that returns a TablePlugin which prepends a right-aligned, monospaced row-number column. Numbering follows the rendered data order (reflecting the current sort / filter / pagination view) and starts at 1 by default. Astryx renderCell receives only the row item, so the plugin takes the rendered data array to derive each ordinal.

ts
import { useTableRowIndex } from '@astryx-vue/core/Table'

Examples ​

useTableRowIndex — Numbered Rows

#
Title
Artist
Plays
1NightfallAva Chen1820
2EmberLiam Park942
3TidalZoe Vega3310
4CinderMax Ross604
5HalcyonMia Cole2075

A table with a prepended row-number column. Numbering is monospaced, right-aligned, and follows the rendered data order.