Skip to content

Commit

Permalink
Refactor #5106 - OrderList improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Jan 19, 2024
1 parent 3b76446 commit a91450b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/lib/orderlist/OrderList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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;
},
Expand Down

0 comments on commit a91450b

Please sign in to comment.