Need a special offer?Find out if your project fits.
+

reportcomplete event does not always fires

Answered
Oleg asked on September 13, 2021

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 September 14, 2021

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 September 14, 2021

No i need report complete

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster September 16, 2021

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