fix: currentPage of pagination component is undefined #1002

Merged
konrad merged 2 commits from fix/current-page-undefined into main 2021-11-14 21:06:26 +00:00
Owner

This PR fixes the following error when opening list views (List or Table):

Invalid prop: type check failed for prop "currentPage". Expected Number with value NaN, got Undefined

The prop value is coming from a mixin and I'm suspecting the mixin is not yet available when the pagination component gets mounted into the page.

This PR fixes the following error when opening list views (List or Table): ``` Invalid prop: type check failed for prop "currentPage". Expected Number with value NaN, got Undefined ``` The prop value is coming from a mixin and I'm suspecting the mixin is not yet available when the pagination component gets mounted into the page.
konrad added 1 commit 2021-11-14 20:25:18 +00:00
continuous-integration/drone/pr Build is passing Details
c3e8808edf
fix: currentPage of pagination component is undefined
konrad requested review from dpschen 2021-11-14 20:25:25 +00:00
Member

Hi konrad!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://1002-fixcurrent-page-undefined--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi konrad! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://1002-fixcurrent-page-undefined--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
Member

It feels like either currentPage should never be undefined or the prop of the pagination component shold not be required and instead default to 0.

It feels like either currentPage should never be undefined or the prop of the pagination component shold not be required and instead default to `0`.
konrad added 1 commit 2021-11-14 20:51:29 +00:00
Author
Owner

It feels like either currentPage should never be undefined or the prop of the pagination component shold not be required and instead default to 0.

I think that makes more sense. Refactored to set it to 0 by default.

> It feels like either currentPage should never be undefined or the prop of the pagination component shold not be required and instead default to 0. I think that makes more sense. Refactored to set it to `0` by default.
dpschen approved these changes 2021-11-14 20:54:56 +00:00
konrad merged commit 6c6ccc647e into main 2021-11-14 21:06:26 +00:00
konrad deleted branch fix/current-page-undefined 2021-11-14 21:06:27 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.