Use the multiselect component to prompt the user to select multiple items from a list.
Responsive UI supports 2 modes for multiselect:
Multiselect with filtering
Multiselect with grouping
Multiselect with filtering
The multiselect with filtering option is good for cases when there are a large number of options in the list.
Filtering allows the user to reduce the list to only those options that contain a particular text string.
A multiselect with filtering in its normal, closed state
A multiselect with filtering showing its dropdown with multiple selection options
Multiselect with grouping
The multiselect with grouping option is good for cases when you need to group options in the list.
A multiselect with grouping in its normal, closed state
A multiselect with grouping showing its dropdown with grouped selection options
Development
Web component development
Component reference
p-multiSelect
p-multiSelect
Module: MultiSelectModule
-
Package: primeng
⚠️ This component requires the use of Angular and will not work in non-Angular applications.
Allows multiple selection using a compact user experience that allows the user to filter the list
If you're adding PrimeNG to your solution for the first time, reference their
setup documentation.
It's important to note that the inclusion of the nova-light theme css is not necessary
to work with Responsive UI. Styling for the PrimeNG components is provided by Responsive UI's theming.
Implementing multiselect with filtering
For multiple selection cases where you want to allow the user to filter the list, use the PrimeNG p-multiselect component.
Begin by importing the MultiSelectModule module into your application.
Import the module
// import into app.module
import{MultiSelectModule}from'primeng/multiselect';@NgModule({imports:[...MultiSelectModule,...]})exportclassAppModule(){}
Import SelectItem from the PrimeNG API. Set up data for the multiselect in the component or within a service.
If you're adding PrimeNG to your solution for the first time, reference their
setup documentation.
It's important to note that the inclusion of the nova-light theme css is not necessary
to work with Responsive UI. Styling for the PrimeNG components is provided by Responsive UI's theming.
Implementing multiselect with filtering
For multiple selection cases where you want to allow the user to filter the list, use the PrimeNG p-multiselect component.
Begin by importing the MultiSelectModule module into your application.
Import the module
// import into app.module
import{MultiSelectModule}from'primeng/multiselect';@NgModule({imports:[...MultiSelectModule,...]})exportclassAppModule(){}
Import SelectItem from the PrimeNG API. Set up data for the multiselect in the component or within a service.