[FIXED] using Rating in ng select angular


I tried to use p-rating in ng select but when I want to click on Rating the ng select is clicked if I want to just click on Rating but ng select is clicked My problem is that I want to click Rating but after click my dropdown clicked instead of rating
my html code

  <ng-select class="dir" [items]="Menu" bindLabel="title" bindValue="facode" [notFoundText]="NotFoundText"
        (search)="onSearch($event)" placeholder="جستجو در منو..." (change)="selectMenu($event)">
        <ng-template ng-option-tmp let-item="item" let-index="index">
          <p> {{item.title}} </p>
          <p-rating    stars="1" [cancel]="false"></p-rating>

Please see the photo

enter image description here


Use event.stopPropagation(); in your change and search method.

Answered By – Rohit Goyal

Answer Checked By – Robin (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published