ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 123 forks source link

click on items getting input blank #330

Open chaouiy opened 6 years ago

chaouiy commented 6 years ago

When user clicks inside the list formatted elements nothing happened (input gets blank). Clicks work only outside html element declared in autocompleteListFormatter

 autocompleListFormatter = (data: any) => {
    let html = `<p class="d-inline-block" style="padding-top: 10px; cursor:default;"><img class='img-rounded' width='32px' src='${data.picture}'/> <strong class="m-l-xs">${data.first_name} ${data.last_name} </strong></p>`;
    return this._sanitizer.bypassSecurityTrustHtml(html);
  }
chaouiy commented 6 years ago

after tests the problem occurs when clicking on images, Any suggestions to handle this ?

almothafar commented 6 years ago

May you please provide a working plunker example?

knvpk commented 6 years ago

Hi @amineparis , this happens with element HTML content also.