diff --git a/src/components/picklist/PickList.vue b/src/components/picklist/PickList.vue index 899853fca..eb7ac682e 100644 --- a/src/components/picklist/PickList.vue +++ b/src/components/picklist/PickList.vue @@ -135,7 +135,8 @@ export default { this.$emit('reorder', { originalEvent: event, value: value, - direction: this.reorderDirection + direction: this.reorderDirection, + listIndex: listIndex }); } }, diff --git a/src/views/orderlist/OrderListDoc.vue b/src/views/orderlist/OrderListDoc.vue index 57771fa65..2cdeb26ce 100644 --- a/src/views/orderlist/OrderListDoc.vue +++ b/src/views/orderlist/OrderListDoc.vue @@ -9,7 +9,7 @@ import OrderList from 'primevue/orderlist';
OrderList requires an array as its value bound with the v-model directive and a template for its content.
-Header of the component is defined with the "header" template and to define the content of an item in the list a named templated called "item" needs to be defined which gets the +
Header of the component is defined with the "header" template and to define the content of an item in the list a named template called "item" needs to be defined which gets the item and the index via slotProps.
OrderList requires an array as its value bound with the v-model directive and a template for its content.
-Header of the component is defined with the "header" template and to define the content of an item in the list a named templated called "item" needs to be defined which gets the - item and the index via slotProps. -
+PickList requires a multidimensional array as its value bound with the v-model directive and a template for its content + that gets the item instance and the index via slotProps.
In addition to the mandatory "item" template, picklist provides "sourceHeader" and "targetHeader" slots as optional templates.
+In case you'd need to access the selected items in the list, define a binding to the selection property with the sync operator so that +
In case you need to access the selected items in the list, define a binding to the selection property with the sync operator so that it gets updated when the user makes a selection. Since it is two-way binding enabled, your changes to the selection will be reflected as well. Note that this is optional and only necessary when you need to access the selection.
- -Use the sync operator to enable two-way binding.
- +