Closed liza-veis closed 1 week ago
Should this part be rendered if there is 1 of 1
pages?
Also according to the design, I see that the background color of buttons is transperent. Do I need to change it on hover (with configured transition?). If so, then what color should it changed to? (one from the figma, or transpepent black, so it looks like tint)
page
andperPage
parameters should be stored as URL query string
This means that I don't need any state inside my component, and can just get handlers for buttons/select throuh the props, right?
Should this part be rendered if there is 1 of 1 pages?
yes
And what about edge cases: do I need to disable buttons (so user can't press them and cursor do not change), which cannot change table (i.e. If there is 10 pages, and current on is first, then first two buttons (go to start and go to previous) are make no sence, cause there is nowhere to move). Or maybe those button even must disapper, instead of become disabled?
let's disable buttons, if there are no pages left to move.
page and perPage parameters should be stored as URL query string
This means that I don't need any state inside my component, and can just get handlers for buttons/select throuh the props, right?
I think there should be a custom hook, like usePagination. Perhaps, you will need both the state inside it and query parameters. You will need to take initial data from query params, then you may need to store parsed info in the local state, and whenever something changes, update query params.
Everything is good, thank you !
What feature?
page
andperPage
parameters should be stored as URL query stringScreenshots