ngc-float-button.component events triggered when float-item is clicked
Closed this issue · 4 comments
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.
- ngc-float-button.component.js line #13 add EventEmitter to the @angular/core import
- in the constructor (i put mine on line #25) add this.clicked = new EventEmitter();
- in line #165 I added 'clicked': [{ type: Output },],
- May be a good idea to make the float-button event independent from the float-item events if there is not already a way to do this.
- If there is a way, I couldn't figure it out and apologize for creating this.
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.
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.
Closed because the author does not explained more details.
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?