Closed punx120 closed 1 year ago
Ended up doing something a bit ugly:
tf.emitter.on(['initialized'], parseRows);
tf.emitter.on(['column-sorted'], (tf, sc, desc) => parseRows(tf));
tf.init();
// var stylesheet = tf.getStylesheet('default');
// stylesheet.href = tf.themesPath + 'transparent/transparent.css'
function parseRows(tf) {
var cellIndex = 0; // POP column
var rowsIdx = tf.getValidRows();
rowsIdx.forEach(function(idx){
var row = tf.dom().rows[idx];
var cell = row.cells[cellIndex];
cell.innerHTML = idx - 1
});
}
Well done, that's the idea: leverage the as much as possible the many hooks provided by the library 👍
Hi
Thanks for the great library, is there currently a way to display the row number automatically? especially after sorting?
Thank you.