Skip to content

Commit

Permalink
Merge branch 'FreeTubeApp:development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
MarmadileManteater authored Jul 3, 2022
2 parents df003a0 + 3ccdf56 commit 4a928e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderer/components/ft-input/ft-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ export default Vue.extend({
},

handleKeyDown: function (keyCode) {
if (this.dataList.length === 0) { return }
if (this.visibleDataList.length === 0) { return }
// Update selectedOption based on arrow key pressed
if (keyCode === 40) {
this.searchState.selectedOption = (this.searchState.selectedOption + 1) % this.dataList.length
this.searchState.selectedOption = (this.searchState.selectedOption + 1) % this.visibleDataList.length
} else if (keyCode === 38) {
if (this.searchState.selectedOption === -1) {
this.searchState.selectedOption = this.dataList.length - 1
if (this.searchState.selectedOption < 1) {
this.searchState.selectedOption = this.visibleDataList.length - 1
} else {
this.searchState.selectedOption--
}
Expand Down

0 comments on commit 4a928e8

Please sign in to comment.