I have hook
export const useOnReportComplete = (flexmonsterRef: RefObject<Pivot>): void => {
useEffect(() => {
const onComplete = () => {
};
flexmonsterRef.current?.flexmonster.on('reportcomplete', onComplete);
return flexmonsterRef.current?.flexmonster.off('reportcomplete', onComplete);
});
};
Problem is that onComplete method calls not on every report completing. I'm using custom data server.
Hi Oleg,
Thank you for posting your question.
Since you're saying the event does sometimes fire, any chance you actually want to use the reportchange
event instead of reportcomplete
?
The difference is, reportchange
fires on every report change, while reportcomplete
is triggered in the initial rendering stages.
Please let us know your thoughts.
Best regards,
Mykhailo
No i need report complete
Hi Oleg,
Thank you for your reply.
In this case, could you please provide us with a sample project where this issue is reproducible?
Additionally, it would help to understand in what scenarios the reportcomplete
event is not working as you expect – please elaborate on this if possible.
Looking forward to your response!
Regards,
Mykhailo