pikax / vue-composable

Vue composition-api composable components. i18n, validation, pagination, fetch, etc. +50 different composables
https://pikax.me/vue-composable/
MIT License
1.17k stars 67 forks source link

useArrayPagination: currentPage stays at 0 when filling empty array #1039

Open Larsluph opened 9 months ago

Larsluph commented 9 months ago

Observed behavior

  1. Create pagination with empty array (lastPage: 0 => currentPage: 0)
  2. Fill array with data (API call or just async delay)
  3. Empty results (lastPage: 114, currentPage: 0 != 1)

Expected behavior

  1. Create pagination with empty array (currentPage: 0)
  2. Fill array with data
  3. First page is shown (currentPage: 1)