플로팅 버튼 내용 1개 일경우 바로 실행되도록 수정.

This commit is contained in:
leejinho 2020-01-31 15:40:30 +09:00
parent 52bd202c6a
commit 17a9208c63

View File

@ -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) {