Source of demo: rownumbers/run.astro.
Row numbers like in a spreadsheet – one flag. Switch to 1,000,000 rows: the “#” column grows to fit the largest number; filter and it gets narrower again. MIT-licensed, no dependencies (at ag-Grid row numbers are an Enterprise feature).
const tableModel = TableFactory.createTableModel({ rows: orders, rowNumbersVisible: true // or { mode: "original", format: n => n.toLocaleString() }});"display" numbers the current view (1, 2, 3 … after sorting and filtering), "original" keeps
each row’s position in your data.exported: true.tableApi.getColumnIndex("total").Training: chapter 18 – row numbers · API: CreateTableModelPara.rowNumbersVisible, RowNumberColumnDef.