<FlexmonsterReact.Pivot id="pivot-container" ref ="pivot" toolbar = "true"
beforetoolbarcreated = {this.customizeToolbar}
reportcomplete = {this.setWidth}
I am trying to set the width of column to specific value but it goes to many loops
setWidth = ()=>{
console.log("changing with ");
var report = window.flexmonster.getReport();
report["tableSizes"] = {"columns":[{"idx":0,"width":80},{"idx":1,"width":100}]};
window.flexmonster.setReport(report);
}
is there other way to do so ?
i tried
flexmonster.on('reportcomplete', function () {
alert('Report completed!'); setwidth // this causes infinte loop too
});
Is there any other event i can use to set width of column?
window.flexmonster.tableSizes({"columns":[{"idx":0,"width":80},{"idx":1,"width":100}]}); we dont have something like this right ?
Hello Sabby,
Thank you for writing. Please try adding window.flexmonster.off("reportcomplete");
after window.flexmonster.setReport(report);
. off() API call removes JS handlers for the specified event so there will be no infinite loop. Let me know if it helps.
Regards,
Tanya
thanks it works perfectly now. thank you