How do I implement autocomplete in a <mat-select> component?

Discussão em 'Angular' iniciado por Maurice, Fevereiro 20, 2025.

  1. Maurice

    Maurice Guest

    I would like to combine the autocomplete feature with a multiselect mat-select chooser because the optionslist will be quite long.

    I've already searched on stackoverflow for the answer and the closest to an answer was this implement a search filter for the <mat-select> component of angular material

    However the examples are about table and not mat-select.

    My question is, is it possible to add the autocomplete feature to mat-select. And if not could i make an autocomplete that includes checkboxes in front of each item in the list?

    Thank you

    EDIT: I've found out that primefaces for angular does have a multiselect list that allows you to search for listitems. It also includes a builtin select-all button! You can find it here https://www.primefaces.org/primeng/#/multiselect

    You can install primefaces with npm install primeng --save

    Continue reading...

Compartilhe esta Página