Skip to content

Commit

Permalink
fix: search delegates by page
Browse files Browse the repository at this point in the history
  • Loading branch information
juliahermak committed Jan 17, 2024
1 parent c9ba846 commit 1a2aeb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/DelegatesTable/DelegatesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export default defineComponent({
const startIndex = (page.value - 1) * perPage.value
const endIndex = startIndex + perPage.value
const filteredDelegates = [...delegates.value]
const delegatesOnCurrentPage = delegates.value.slice(startIndex, endIndex)
const filteredDelegates = [...delegatesOnCurrentPage]
.sort(sortDelegatesByColumnCompareFn(sortBy.value))
.filter(filterDelegatesFn(searchQuery.value))
.slice(startIndex, endIndex)
return reactive(filteredDelegates)
})
Expand Down

0 comments on commit 1a2aeb3

Please sign in to comment.