GustavoCostaW / ngc-float-button

Google Material Design Float Button - Implementation for Angular v4+. Demo: http://bit.ly/2yIya2f
MIT License
58 stars 24 forks source link

ngc-float-button.component events triggered when float-item is clicked #12

Closed Marshal27 closed 6 years ago

Marshal27 commented 6 years ago

Just wanted to bring this to your attention, when clicking the ngc-float-item-button it triggers the events: Subject on the ngc-float-button.

I needed a scenario when the parent button is clicked, it will have an independent click event from the children. I had to add the same @clicked output event emitter that is on the float-item to the float-button to do so.

here were my manual changes to the compiled library for anyone needing this.

  1. ngc-float-button.component.js line #13 add EventEmitter to the @angular/core import
  2. in the constructor (i put mine on line #25) add this.clicked = new EventEmitter();
  3. in line #165 I added 'clicked': [{ type: Output },],

all in all thank you for all your work on this library, I needed this functionality in my project and your library saved me a lot of time coding it myself.

GustavoCostaW commented 6 years ago

Hi @xxNoxiouSxx thank you for issue and feedback, well, I didn't understand what you exactly want, but you can listen to events in float-button and also in float-button-item.

<ngc-float-button icon="add" (click)="reactEventFloatButton()">
    <ngc-float-item-button icon="person_add" content="click me" (click)="reactEventFloatButtonItem()">></ngc-float-item-button>
</ngc-float-button>

What do you really want, can you explain more details? thank you.

GustavoCostaW commented 6 years ago

Closed because the author does not explained more details.

yavarnia commented 6 years ago

hey buddy, when i have multiple float action item button inside ngc-float-button the click event does not work properly and it just fire the click event for the last ngc-float-item-button item, please help what is problem?

m-yazdani commented 6 years ago

@yavarnia i have exactly same problem and i didn't figure what's the problem