-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing spinner in a setTimeout function to avoid blinking spinners #62
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR @rgriffogoes ! I just tried this out locally, and it seems like the spinner doesn't show up in the initial load. Does this happen to you too? Example app:
The spinner doesn't show up at all the first time, and afterwards it works correctly. |
Took some time to find time but the "first time" showing issue is fixed @daattali |
@rgriffogoes I apologize for leaving this for so long. I do like this PR, the only thing I want to change is that when the delay is 0 (which will be the most common), I prefer not to have to use a javascript Thanks! |
@rgriffogoes I would love to include this feature. This package had a lot of work done on it recently, would you be willing to comtinue this PR? |
Adding configurable delay (show.delay property) before showing spinner (and if a hide comes before delay, it doesn't show at all).
Default values should behave almost* the same as before: with a 0 delay timeout function it can be that the show/hide cycle behaves differently, but on my understanding it would behave better (e.g.: if somehow the hide spinner happens immediately after the display, nothing will happen while before the change the dom would be affected twice)
Split from pull request #61
Added one more button to example, to allow a test where only the data is updated - setting sleep time to 0 one can see how the show.delay can be used