-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
loading.throttle doesn't seem to work #5519
Comments
in your reproduction link, you should replace 'thottle' to 'throttle' |
LOL, I guess it was my turn to be 'that guy' ... Fixed, problem still remains (yes I restarted the sandbox & yes it was the right syntax locally when we found the problem).. @manniL |
Thanks for your contribution to Nuxt.js!
Issues that are labeled as |
ping @manniL |
Thanks for your contribution to Nuxt.js!
Issues that are labeled as |
Can't repro in Firefox 🤔 |
Grr, now I can't repro either in the sandbox (I was able to repro before dozens of times). I'll check local and verify everything is ok now. |
Local dev looks fine now too. I assume this was fixed in a later version or something. |
I can confirm this issue does exist but it has nothing to do with Nuxt itself, it's only when you use the Axios module. This is a knowns issue and has an open pull request. |
Yeah this is weird. In my local dev, setting throttle to 20s still shows the progress bar immediately. I don't know how this would be anything other than nuxt's fault. It's their component that should be abiding by the nuxt.config.js |
@hecktarzuli no the @nuxtjs/axios module calls the set method on the loading component that immediately shows the loading bar. This is by design. The pull request I referenced is their to discus if the @nuxtjs/axios module should change its behavior so it respects the throttle configuration set by the user. |
That abstraction is pretty messy. IMHO, Nuxt should expose a loading object that webpack, axios and other junk can add and remove stuff from as things are loaded. Then the only thing the loading component would need to do is decide how to render that abstraction over time. In other words, the axios plugin should NOT be playing with the loading component, what it should be doing it just telling nuxt its loading X many resources and remove them when they are done loading. (@manniL) |
Version
v2.5.1
Reproduction link
https://codesandbox.io/s/zx50vm1jql
Steps to reproduce
Go to link
Slow down network (either delay 10s or change profile to 1k/sec up/down)
notice the second you click About button, the progress bar shows, even though throttle is set to 5000
What is expected ?
Per documentation, progress bar shouldn't show until throttle is expired
What is actually happening?
Progress bar is shown right away
The text was updated successfully, but these errors were encountered: