From 062e01b8f52eac88e7f2935a233330261ec87cda Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Tue, 16 Jul 2019 16:48:32 +0300 Subject: [PATCH] Animation for orderlist --- src/components/orderlist/OrderList.vue | 15 ++++++++---- src/views/orderlist/OrderListDemo.vue | 33 ++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/components/orderlist/OrderList.vue b/src/components/orderlist/OrderList.vue index 158bc7fc0..05f5063f9 100644 --- a/src/components/orderlist/OrderList.vue +++ b/src/components/orderlist/OrderList.vue @@ -10,12 +10,12 @@
- + @@ -57,13 +57,13 @@ export default { }, updated() { if (this.reorderDirection) { - this.updateListScroll(); + //this.updateListScroll(); this.reorderDirection = null; } }, methods: { getItemKey(item, index) { - return this.dataKey ? ObjectUtils.resolveFieldData(rowData, this.dataKey): index; + return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey): index; }, isSelected(item) { return ObjectUtils.findIndexInList(item, this.d_selection) != -1; @@ -384,7 +384,7 @@ export default { } .p-orderlist.p-state-disabled .p-orderlist-list { - overflow:hidden; + overflow: hidden; } .p-orderlist .p-orderlist-droppoint { @@ -392,6 +392,11 @@ export default { list-style-type: none; } +.p-orderlist-flip-move { + transition: transform .2s; + z-index: 1; +} + @media (max-width: 767px) { .p-orderlist-controls { width: 100%; diff --git a/src/views/orderlist/OrderListDemo.vue b/src/views/orderlist/OrderListDemo.vue index 0eb4fba66..464c076ed 100644 --- a/src/views/orderlist/OrderListDemo.vue +++ b/src/views/orderlist/OrderListDemo.vue @@ -8,14 +8,14 @@
- + @@ -45,4 +45,27 @@ export default { 'OrderListDoc': OrderListDoc } } - \ No newline at end of file + + + \ No newline at end of file