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

md-button @click do not work #532

Closed
Leshgan opened this issue Feb 18, 2017 · 15 comments
Closed

md-button @click do not work #532

Leshgan opened this issue Feb 18, 2017 · 15 comments
Labels

Comments

@Leshgan
Copy link

Leshgan commented Feb 18, 2017

I'm trying this code
http://jsbin.com/hejulu/edit?html,js,output
What is wrong with my code?

@MarkSimUM
Copy link

@click.native will work

@cawa-93
Copy link

cawa-93 commented Feb 18, 2017

@marcosmoura, I noticed a lot about this issue. It may be necessary to add the solution in the documentation? As an example of one of?

@Samuell1
Copy link
Member

@cawa-93 its not issue but on components needs to be click with native

@Leshgan
Copy link
Author

Leshgan commented Feb 19, 2017

Thanks!

@Leshgan Leshgan closed this as completed Feb 19, 2017
@flamedenise
Copy link

In my case, @click.native did not work, but v-on:click.native did ;)

@enesunal
Copy link

enesunal commented May 3, 2017

Why it's not working? ".native" in Vue documentation explained as, "There may be times when you want to listen for a native event on the root element of a component. In these cases, you can use the .native modifier for v-on." However, vue-material using .native. It's a bit awkward though. Isn't it a vue- extension?

@Samuell1
Copy link
Member

Samuell1 commented May 3, 2017

@flamedenise its weird because @click.native its shortcut of v-on:click.native

@Chusynuk
Copy link

Using @click.native="$router.push('/homescreen')" with router-link tag I cannot visualize the button on a sidenav, anyone had the same problem?

@Samuell1
Copy link
Member

Samuell1 commented May 16, 2017

@Chusynuk use without router link

          <router-link
            :to="{ path: '/homescreen' }"
            exact
          >
            ....
          </router-link>

@Chusynuk
Copy link

This is the complete tag

tag="md-button" :to="{ path: './Requests' }" class="md-primary"

if I add the tag="md-button" I can visualize the button, but I doesn't work

@simonl65
Copy link

This appears to be a breaking change, as it used to work OK (see https://www.youtube.com/watch?v=1j8xTOmR8pw).

@mmieluch
Copy link

mmieluch commented Jun 9, 2017

It's because of the ink ripple component. The default behaviour comes back when you disable it:

Vue.material.inkRipple = false

@enesunal
Copy link

enesunal commented Jun 9, 2017

Then, there should be a fix for it, right?

@simonl65
Copy link

simonl65 commented Jun 9, 2017

@enesunal That would be nice, but this was noted as a breaking change in v0.7.0

To avoid issues and conflicts between multiple events on buttons and other "clickable" components the internal @click event don't work anymore. Use @click.native instead.

@buzzingcookie
Copy link

I recently started to use vue-material and i believe using @change should work fine, i used that on my md-checkbox and its cool, cheers!

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

No branches or pull requests