Is it possible to display a working progress bar or spinner when a State is Selected ?
Is it possible to display a working progress bar or spinner when a State is Selected ?
desperado
Posts: 159Questions: 33Answers: 4
in StateRestore
I have a table which has 8000 rows. I am using search builder and state restore.
When select a state which limits the data to 3600 of the 8000 it takes about 6 seconds for the menu to drop after I make the selection.
Is it possible to display some working indicator once a state is selected and drop it when the menu drops ?
Answers
There is this thread that might help. Doesn't look like a complete solution was posted but maybe it will give you some ideas.
Kevin
@kthorngren Thanks that's a nice pluggin and good to see another user needs the same thing but so far I am unable to find a place to start and stop the processing pluggin. The display wan't really the issue it's finding hooks to do it.
I thought I could use the stateRestore-change event but that is not triggered on selection of a state.
@sandy Is the StateRestore menu supposed to drop "before" the state loads? I have a problem because it doesn't lower until after and the load is taking over 6 seconds for a large data set with seachBuilder (8000 rows).
Looking at the code I think you do try to lower the menu but it doesn't seem to work. Clicking on the background doesn't seem to close the stateRestore state selection window.
If the menu is expected to close when the load is done then can you provide a hook to start a processing display before the load starts and another when the load is done ?
I tried hacking your js code and adding my show and hide of my processing image.
@Sandy I was able to get my processing spinner working by adding two events in your code. stateRestore-load-start and stateRestore-load-end.
For this to work I needed to issue the start and then set a timeout to start the load processing so the spinner could display before the load started, without the timeout the show on the spinner doesn't happen.
This is where I placed the trigger of the events.
Would you be able to add this to the base code. There are others with this same issue so I think it would be helpful.
If you are willing to add this then I think you would need to add the events here as well. Although I guess the user of the api could just implement the processing start, timeout call to load and processing end. Your call....