Skip to content
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

Disabled buttons #160

Closed
murbanowicz opened this issue Nov 2, 2016 · 1 comment
Closed

Disabled buttons #160

murbanowicz opened this issue Nov 2, 2016 · 1 comment

Comments

@murbanowicz
Copy link
Contributor

murbanowicz commented Nov 2, 2016

Hi,

I found that to have really disabled button - not only looking like disabled,
I have to use:

v-bind:class="{disabled: EventIsNew}"
                        v-bind:disabled="EventIsNew"

If there is no v-bind:class, hover state is visible on button which will make user confused,
if there is no v-bind:disabled, obviously it is not preventing @click which is of course bad behaviour.

Is this nature of CSS or it can be fixed ?


Sorry for a lot of issues. Just trying to help you make Q awesome! :)

@rstoenescu
Copy link
Member

Hi,

Don't worry about logging many issues, you are indeed making Q better with each.
<button> is not a component but a simple DOM element. This has been designed with performance in mind, just like everything in Quasar. Whenever possible for Vue not to render a component we use a native DOM element. So, for buttons there's no binding to actually make it disabled. You as a developer deal with that. You got @click and you got CSS class disabled (that can be applied to anything). Let's take your example: you add disabled class when EventIsNew is true. Your duty is to also take care of dealing with EventIsNew in your @click method (if (EventIsNew) return).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants