Quasar: QBtn in loading state can still submit a form

Created on 25 Jan 2020  路  5Comments  路  Source: quasarframework/quasar

Is your feature request related to a problem? Please describe.
I can't imagine case when button shouldn't be disabled while it's in loading state.
When it is loading? e.g. when it is "submit" button, we click to send data - button is being in "loading" state.
But it should be disabled, we not able to click the button again before response/callback is given

Describe the solution you'd like
Combine loading and disable states. If it is loading - is should be disabled.

Describe alternatives you've considered
Or, not the best way, new prop, smth like submitting - we see spinner and button is disabled.

bug

Most helpful comment

Thanks for reporting this.
Fix will be available in "quasar" v1.8.3.

Took this opportunity to make some nice enhancements to the behavior of QBtn in loading state too.

All 5 comments

Now all the "submit" buttons I must duplicate state in two props to prevent missclick while data's sending
<q-btn :loading="loading" :disable="loading" />

Hi,

QBtn does not emit any click events when in loading mode however the <form> native tag doesn't care about that. Will fix this behavior.

So is it just "visual" bug?

Not a visual bug. Just a side effect of how browsers work when QBtn is wrapped by a <form>.

Thanks for reporting this.
Fix will be available in "quasar" v1.8.3.

Took this opportunity to make some nice enhancements to the behavior of QBtn in loading state too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xereda picture xereda  路  3Comments

florensiuslaylim picture florensiuslaylim  路  3Comments

fnicollier picture fnicollier  路  3Comments

green-mike picture green-mike  路  3Comments

adwidianjaya picture adwidianjaya  路  3Comments