From 26d30ab2983358049284bed24550a63368386fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 6 Jun 2023 16:30:04 +0300 Subject: [PATCH] Refactor #3965 - For PickList --- components/lib/picklist/BasePickList.vue | 7 ++++--- components/lib/picklist/PickList.vue | 26 +++++++----------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/components/lib/picklist/BasePickList.vue b/components/lib/picklist/BasePickList.vue index 2ac4a262f..3197ca54f 100644 --- a/components/lib/picklist/BasePickList.vue +++ b/components/lib/picklist/BasePickList.vue @@ -47,12 +47,13 @@ const classes = { ], sourceControls: 'p-picklist-buttons p-picklist-source-controls', sourceWrapper: 'p-picklist-list-wrapper p-picklist-source-wrapper', + sourceHeader: 'p-picklist-header', sourceList: 'p-picklist-list p-picklist-source-list', - item: ({ context }) => [ + item: ({ instance, item, id, listIndex }) => [ 'p-picklist-item', { - 'p-highlight': context.active, - 'p-focus': context.focused + 'p-highlight': instance.isSelected(item, listIndex), + 'p-focus': id === instance.focusedOptionId } ], buttons: 'p-picklist-buttons p-picklist-transfer-buttons', diff --git a/components/lib/picklist/PickList.vue b/components/lib/picklist/PickList.vue index 8e10e1877..e4682f684 100755 --- a/components/lib/picklist/PickList.vue +++ b/components/lib/picklist/PickList.vue @@ -33,7 +33,7 @@
-
+
@@ -134,15 +128,7 @@