How to use selectedItemsLabel correctly with PrimeNg MultiSelect

Discussão em 'Angular' iniciado por Tanzeel, Janeiro 8, 2025.

  1. Tanzeel

    Tanzeel Guest

    I'm using MultiSelect component from PrimeNg. I want to use a property selectedItemsLabel. This property is used to set the text to "1 item selected", "2 items selected" and so on as you keep on selecting. I want to put some custom text there. Here is my code:

    <p-multiSelect ... [selectedItemsLabel]="selectedItemsLabel"></p-multiSelect>


    Here is the logic:

    selectedItemsLabel;
    onSelectingItem() {
    this.selectedItemsLabel="Hello world";
    }


    But then the dropdown text becomes blank. Am I not using it correctly? Please point out my mistake.

    Continue reading...

Compartilhe esta Página