Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Created August 4, 2021 09:36
Show Gist options
  • Save reachkamrul/ddeea74bf75e0661d0235eeb221ce86d to your computer and use it in GitHub Desktop.
Save reachkamrul/ddeea74bf75e0661d0235eeb221ce86d to your computer and use it in GitHub Desktop.
var columnKey = "mileage"; //Give your column key here
function runAll (){
$table.on('ninja_table_all_chunk_loaded', () => {
setTimeout(
function()
{
$('tbody .ninja_clmn_nm_'+columnKey).each(function(){
$(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") );
});
}, 1000);
})
}
runAll();
$table.on('after.ft.filtering', function() {
runAll();
});
$table.on('after.ft.paging', function() {
runAll();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment