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

check, if flexmonster in loading state

Answered
Mantas asked on April 22, 2024
  1. Is it possible to check, if Flexmonster loads data at the moment?
  2. Also, clients noticed loading stops if tab is in background - is it possible to force Flexmonster load data and finish repainting even in background mode?

5 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 23, 2024

Hello Mantas,

Thank you for reaching out to us.

Please find our answers below:

  1. Flexmonster provides the loadingdata event that is triggered when data starts loading from local or remote CSV, JSON. You are welcome to check the example on the following JSFiddle: https://jsfiddle.net/flexmonster/quzf2gko/. Also, could you please provide us with more details on how you want to use this event? It would greatly help us.
  2. Kindly note that the browser's optimization causes the slowness of the data loading from the collapsed tab to slow. Browser allocates less RAM to collapsed tabs since they aren't actively used, reducing export speed. We recommend disabling all settings that limit memory usage for inactive tabs and enabling settings that could improve performance. These settings vary for different browsers but can affect loading.

Looking forward to hearing your feedback.

Kind regards,
Nadia

Public
Mantas April 23, 2024

Hello Nadia,
 
thank you for the answers.
1. I know about event (loadingdata and dataloaded). I can add these events and setup my local variable. But this seems not very reliable (it can be I‘m mistaken, but I had problem with it). Eg. I force update data twice. It seems loading data is fired twice, but dataloaded once.
What I need is to have my local buttons "Save", "Delete", „Expand all“ and „Collapse all“ disabled while data is loading.
2. Ok, so it seems it is not component's problem but browser's problem (client uses Chrome). I have same issue with Edge.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 25, 2024

Hello Mantas,

Thank you for the response.

Kindly note that if you use the updateData API call with the same filename twice, Flexmonster does not load the data a second time. The loadingdata event is only triggered for the first data update since data stays the same after the second update.
For the described use case, we recommend using the loadingdata and dataloaded events. If you want to update the data from the same filename , we recommend adding the unique value to the URL query string, for example, adding the current date as UNIX timestamp:

function updateData() {
flexmonster.updateData({
filename: "data/data.csv?" + Date.now(),
});
}

You are welcome to check the illustration in the following JSFiddle: https://jsfiddle.net/flexmonster/L7xv86tm/

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Public
Mantas April 25, 2024

Thank you for the answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 25, 2024

Hi Mantas,

Thank you for the feedback!

Feel free to contact us in case other questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer