Skip to content

Commit

Permalink
fix index bug
Browse files Browse the repository at this point in the history
  • Loading branch information
noO0oOo0ob committed Feb 28, 2024
1 parent cbbdc5d commit 7562f5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/views/inspector/FlowList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export default {
this.$store.dispatch('focusFlow', flow)
// flowList is a stack structure where new data is added to the header,
// so a negative index is used here to ensure consistency when the data changes
this.focusedFlowIdx = item.index - this.displayFlowList.length
this.focusedFlowIdx = item.index + (this.currentPage-1)*this.pageSize - this.displayFlowList.length
},
keyboardSelctFlow (event) {
if(!this.focusedFlowDetail)
Expand All @@ -381,12 +381,12 @@ export default {
let currentIdx = this.displayFlowList.length + this.focusedFlowIdx
if(currentIdx <= 0)
return
if(currentIdx < (this.currentPage-1)*this.pageSize){
if(currentIdx <= (this.currentPage-1)*this.pageSize){
this.currentPage -= 1
this.refreshFlowList()
}
this.focusedFlowIdx -= 1
this.$store.dispatch('focusFlow', this.displayFlowList[currentIdx-1])
this.$store.dispatch('focusFlow', this.displayFlowList[currentIdx-1])
},
keyboardDownSelectFlow () {
let currentIdx = this.displayFlowList.length + this.focusedFlowIdx
Expand Down

0 comments on commit 7562f5f

Please sign in to comment.