You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello @estevanmaito , im using the pagination component and I discover that onChange funtion is ejecuted on the first render, that's wrong because, onChange function only should be ejecuted when the page is changed, so, I was thinking and I found a problem in the useEffect that handle this function, the problem is that useEffect always will be ejecuted on first render , even if you don't change the state, so my proposal is create a reference using useRef , with that , useEffect will know when the component is rendered for first time.
The text was updated successfully, but these errors were encountered:
davs20
changed the title
onChange function shouldn't be ejecuted on the firtst render.
onChange function on pagination component shouldn't be ejecuted on the firtst render.
Jan 4, 2022
hello @estevanmaito , im using the pagination component and I discover that onChange funtion is ejecuted on the first render, that's wrong because, onChange function only should be ejecuted when the page is changed, so, I was thinking and I found a problem in the useEffect that handle this function, the problem is that useEffect always will be ejecuted on first render , even if you don't change the state, so my proposal is create a reference using useRef , with that , useEffect will know when the component is rendered for first time.
windmill-react-ui/src/Pagination.tsx
Line 158 in fba3fb0
The text was updated successfully, but these errors were encountered: