Commit a94df4d9 authored by dmacfarlane's avatar dmacfarlane
Browse files

fix: don't show menu if items is empty

parent a0f445d5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ export class MentionDirective {
      let componentRef = this._viewContainerRef.createComponent(componentFactory);
      this.searchList = componentRef.instance;
      this.searchList.items = this.items;
      this.searchList.hidden = false;
      this.searchList.hidden = this.items.length==0;
      this.searchList.position(nativeElement, this.iframe);
      componentRef.instance['itemClick'].subscribe(() => {
        nativeElement.focus();
@@ -185,7 +185,7 @@ export class MentionDirective {
    else {
      this.searchList.activeIndex = 0;
      this.searchList.items = this.items;
      this.searchList.hidden = false;
      this.searchList.hidden = this.items.length==0;
      this.searchList.position(nativeElement, this.iframe);
      window.setTimeout(() => this.searchList.resetScroll());
    }