-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Using Pagination component from grommet & passing the dynamic value(dropdown selection value) to the step
prop. I see that when I change the step
value using dropdown & pass it to Pagination component. The pagination page count is not getting changed.
Grommet added a step state than set that value within the PaginationStep so since I changed step
from being directly assigned to stepProp to using useState it was only getting the initial value of stepProp during the initial render and was not updating
Expected Behavior
The pagination page count should change since the step
value is changing
Actual Behavior
The pagination step
prop is not being updated if we pass a dynamic value to Pagination step
URL, screen shot, or Codepen exhibiting the issue
https://codesandbox.io/p/sandbox/grommet-box-forked-ns453z?file=%2Fpackage.json%3A11%2C28
Steps to Reproduce
Your Environment
- Grommet version: 2.36.1
- Browser Name and version: chrome
- Operating System and version (desktop or mobile):