Get Free Trial

reportcomplete event does not always fires

Answered
Oleg asked 3 days ago

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.

3 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster 2 days ago

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

Public
Oleg 2 days ago

No i need report complete

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster 8 hours ago

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

Please login or Register to Submit Answer