diff --git a/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.ts index 733e7562..e67947c8 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/float-action-button.component.ts @@ -47,7 +47,11 @@ export class FloatActionButtonComponent implements OnInit { } onToggleFab() { - this.buttons.length ? this.hideItems() : this.showItems(); + if (this.fabButtons.length > 1) { + this.buttons.length ? this.hideItems() : this.showItems(); + } else if (this.fabButtons.length === 1) { + this.buttonClick.emit({ btn: this.fabButtons[0] }); + } } onClickButton(btn: FloatActionButton) {