From 79d751bfcd1a533bde1dd9045403060abbc24c1b Mon Sep 17 00:00:00 2001 From: Chingiz Mammadov Date: Thu, 12 Oct 2023 19:38:19 +0400 Subject: [PATCH] fix: Picklist: Unexpected behavior on double click while holding control --- components/lib/picklist/PickList.spec.js | 1 + components/lib/picklist/PickList.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/lib/picklist/PickList.spec.js b/components/lib/picklist/PickList.spec.js index 3a319936e..742b00ffe 100644 --- a/components/lib/picklist/PickList.spec.js +++ b/components/lib/picklist/PickList.spec.js @@ -107,6 +107,7 @@ describe('PickList.vue', () => { expect(wrapper.emitted()['update:modelValue'][0][0][1]).toEqual([wrapper.vm.modelValue[0][0]]); expect(wrapper.emitted()['move-to-target'][0]).toEqual([{ originalEvent: {}, items: [wrapper.vm.modelValue[0][0]] }]); + expect(wrapper.emitted()['move-to-source'][0]).toEqual([{ originalEvent: {}, items: [wrapper.vm.modelValue[0][0]] }]); expect(wrapper.emitted()['update:selection'][0][0]).toEqual([[], []]); }); diff --git a/components/lib/picklist/PickList.vue b/components/lib/picklist/PickList.vue index 8efebd2e2..cf947d01e 100755 --- a/components/lib/picklist/PickList.vue +++ b/components/lib/picklist/PickList.vue @@ -440,7 +440,7 @@ export default { this.$emit('move-to-target', { originalEvent: event, - items: selection + items: [...new Set(selection)] }); this.d_selection[0] = []; @@ -500,7 +500,7 @@ export default { this.$emit('move-to-source', { originalEvent: event, - items: selection + items: [...new Set(selection)] }); this.d_selection[1] = [];