From a91450bbc554885b679dc39baa966868da089de8 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Fri, 19 Jan 2024 12:51:50 +0300 Subject: [PATCH] Refactor #5106 - OrderList improvements --- components/lib/orderlist/OrderList.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/lib/orderlist/OrderList.vue b/components/lib/orderlist/OrderList.vue index 55eebd88f..0bc7e67aa 100755 --- a/components/lib/orderlist/OrderList.vue +++ b/components/lib/orderlist/OrderList.vue @@ -193,7 +193,7 @@ export default { this.focusedOptionIndex = index; }, onArrowDownKey(event) { - const optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.findFirstSelectedOptionIndex(); + const optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex() : this.findFirstSelectedOptionIndex(); this.changeFocusedOptionIndex(optionIndex); @@ -204,7 +204,7 @@ export default { event.preventDefault(); }, onArrowUpKey(event) { - const optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.findLastSelectedOptionIndex(); + const optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex() : this.findLastSelectedOptionIndex(); this.changeFocusedOptionIndex(optionIndex); @@ -312,13 +312,13 @@ export default { return [...items].findIndex((link) => link.id === id); }, - findNextOptionIndex(id) { - const matchedOptionIndex = this.findMatchedOptionIndex(id); + findNextOptionIndex() { + const matchedOptionIndex = this.findMatchedOptionIndex(); return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0; }, - findPrevOptionIndex(id) { - const matchedOptionIndex = this.findMatchedOptionIndex(id); + findPrevOptionIndex() { + const matchedOptionIndex = this.findMatchedOptionIndex(); return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0; },