Toolbar menu repeating multiple times on screen

Answered
Nagaraj Chatiri asked on March 16, 2021

Hello,
When the user clicks on the filter button multiple times, after getting results after the first time.
The result is shown only once, but the toolbar is getting repeated, again and again, the nos of times the user fetches the result.
We are using the following code syntax to dispose of if the flexmonster object is already exists.
Also trying to empty the div container every time user click to fetch result button using jQuery, but no solution. 
if (flexmonster != null) {
flexmonster.dispose();
}
$('#pivot-container').empty();
Please provide the solution to this.

5 answers

Public
Nagaraj Chatiri March 16, 2021

We are using the following version of flexmonster.

Public
Milena Pechura Milena Pechura Flexmonster March 16, 2021

Hello, Nagaraj,
 
Thank you for posting to our forum and explaining the issue in detail.
 
We would like to inform you that our team has not managed to reproduce the described behavior on our side.
 
Could you please provide us with an example where the issue is reproducible?
This will greatly help us in our further investigation.
 
Looking forward to your response.
 
Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster March 17, 2021

Hi, Nagaraj,
 
Our team would like to notify you that we have managed to reproduce the issue.
Therefore, there is no need to prepare the example from your end.
 
We will research the case with multiple Toolbar instances and provide you with the results ETA April 19.
 
Still, if we understand correctly, you recreate the Flexmonster instance every time the report needs to be updated. Please consider using the setReport API call instead. It allows setting new reports to the existing Flexmonster instance.
In case recreating the instance is mandatory for your case, please execute the dispose method before creating an instance in the same container. It prepares the pivot table instance to be deleted with the browser’s garbage collection.
 
Both approaches allow avoiding the issue with multiple Toolbars.
 
Please let us know if our suggestions helped and if any other questions arise.
 
Kind regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster April 20, 2021

Hello, Nagaraj,
 
We are pleased to inform you that the issue with multiple Toolbar instances was fixed.
Also, now Flexmonster API is also available from container’s uielement. This means that you can call the component’s methods like so:

document.querySelector('#pivot-container').uielement.flexmonster.getReport();

We assume it can be useful for your case.
 
This is available in the 2.8.31 version of Flexmonster: https://www.flexmonster.com/release-notes/.
You are welcome to update the component.

Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please contact us in case any questions arise.
 
Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster May 25, 2021

Hi, Nagaraj,
 
Our team was wondering whether the recent fix helped.
Please let us know if everything works fine now.
 
Looking forward to your response.
 
Kind regards,
Milena

Please login or Register to Submit Answer