PygmySlowLoris / vue-fab

Vue Floating Action Button
MIT License
273 stars 51 forks source link

No fab actions #17

Closed dylantientcheu closed 6 years ago

dylantientcheu commented 6 years ago

I need to be able to click on the main button and fire events without opening the smaller buttons.

dylantientcheu commented 6 years ago

Instead, when I use @click or @click.native on the main button, an error is logged

[Vue warn]: Error in callback for watcher "toggle": "TypeError: Cannot read property 'length' of undefined"
found in
---> <Fab> at node_modules\vue-fab\src\FAB.vue
Edujugon commented 6 years ago

Hi @blurdylan ,

We've just released a new package version with that fix. Now you can use @click.native on the main button.

jvb93 commented 5 years ago

@Edujugon ugh the FAB rotates and doesn't un-rotate with this method? any tips?

Edujugon commented 5 years ago

Hi @jvb93 ,

I'm trying to reproduce the issue but it actually rotates and un-rotates just fine. Could you share some code snippet to see how you're using the component?

Edujugon commented 5 years ago

Hey, I think I was not getting your point...But now I guess I do.

So basically when you click on the button it rotates and keeps that position.

What would be the desired behaviour?

jvb93 commented 5 years ago

@Edujugon Hmm yeah this is interesting. If there is no menu to display, then the animation to rotate doesn't make much sense at all, as it's not, say rotating to open. Here's what I propose:

EIther way, I am down to code this and PR, no worries.