i have trouble using bootstrapTable plugin,
i use options to initialize my table.
$jq(`#table_${posInd}`).bootstrapTable({
columns: [{
field:'first',
title: '',
footerFormatter: '',
// footerField:''
},{
field: 'indicateur',
title: champUnite,
// footerField:'',
footerFormatter: 'TOTAL',
},
{
field:'nombre',
title:labelTab,
footerFormatter: numberFormatter(myData),
// footerField:'number',
},
{
field:'percent',
title:'%',
footerFormatter: percentFormatter(myData),
// footerField:'pourcent',
}],
search: true,
autoRefresh: true,
// sortable: true,
// pagination: true,
iconsPrefix : 'icon',
data: myData,
});
So this is the function and the option i use, i made 2 function to calculate the total of my columns. the options footerFormatter allow me to add content in my footer, so with that it's working.
I was wondering if there is maybe a better way ? maybe bootstrap table comes with any method to calculate total ??? Because i didn't find any for now
thank you for being indulgent for my english :)