primeNG multiselect on change not triggered on chips removal

Discussão em 'Angular' iniciado por Fseee, Novembro 12, 2024.

  1. Fseee

    Fseee Guest

    below is a sample of my code. A primeng multiselect is the source of a primeng dropdown:

    HTML:

    <p-multiSelect [options]="elements" [(ngModel)]="selectedElements" optionLabel="name" display="chip"
    (onChange)="onElementChange($event)"></p-multiSelect

    <p-dropdown [options]="availableElements" [(ngModel)]="selectedElement" optionLabel="elementID"
    placeholder="Select an Element"></p-dropdown>


    ts:

    onElementChange(event) {
    this.availableElements = [];
    this.availableElements = event.value;
    }


    Selecting elements from the multiselect dropdown is full working, but when I remove an element from the multiselect chips, then the onChange event is not triggered:

    [​IMG]

    How can I trigger the onChange? Is it a not supported event? Thanks in advance.

    Continue reading...

Compartilhe esta Página