Pick List
Overview
Use the pick list component to allow the user to easily move items between two lists.
- Two lists are displayed next to each other.
- The user can move either one or more selected items or move all items at once.
- The user can use either drag and drop or the move buttons to move items between the lists
- The pick list optionally allows the user to filter items in each list. This can be useful if the list contains a large number of items.
Development
Web component development
Component reference
p-pickList
Used to reorder and move items between different lists
View the p-pickList reference doc
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.
Implementation
Add primeng
and primeicons
as dependencies to your package.json
file.
Import the PickListModule
module in app.module.ts
.
Add a <p-pickList>
component to your view. Bind the source
and target
properties to object arrays of your items. Set text values for the sourceHeader
and targetHeader
and enable dragdrop
and responsive
by binding both to true.
If you want the user to be able to filter the lists, specify which data field to filter by in the filterBy
property and enter text values for the sourceFilterPlaceholder
and the targetFilterPlaceholder
.
Finally, create an ng-template
to layout the list data.
In the Typescript file, fetch and assign the data for the source and target lists.
Angular component development
Component reference
p-pickList
Used to reorder and move items between different lists
View the p-pickList reference doc
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.
Implementation
Add primeng
and primeicons
as dependencies to your package.json
file.
Import the PickListModule
module in app.module.ts
.
Add a <p-pickList>
component to your view. Bind the source
and target
properties to object arrays of your items. Set text values for the sourceHeader
and targetHeader
and enable dragdrop
and responsive
by binding both to true.
If you want the user to be able to filter the lists, specify which data field to filter by in the filterBy
property and enter text values for the sourceFilterPlaceholder
and the targetFilterPlaceholder
.
Finally, create an ng-template
to layout the list data.
In the Typescript file, fetch and assign the data for the source and target lists.
Design
Figma design
Dev Component | Design Component Name |
---|---|
Pick List | RUI / Pick List |
Pick List with Up/Down buttons | RUI / Pick List with Reorder Buttons |
Add a pick list component if the user cannot reorder the items in either list.
Add a pick list with up and down buttons component if the user can reorder the items in both lists.
Add a template for each item in the list. See the Text design documentation for more details on displaying different types of text and the Templated Lists design documentation for more details on designing templated lists.
Adobe XD design
- Sample App - List Categorization - Pick List
Dev Component | Design Component Name |
---|---|
Pick List | JHA / Pick List |
Pick List with Up/Down buttons | JHA / Pick List with Up and Down Buttons |
Add a pick list component if the user cannot reorder the items in either list.
Add a pick list with up and down buttons component if the user can reorder the items in both lists.
Add a template for each item in the list. See the Text design documentation for more details on displaying different types of text and the Templated Lists design documentation for more details on designing templated lists.