Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reset pagination to last page if new records are rendered are less than previous #1690

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

ayeshaa-m
Copy link
Contributor

reset pagination start point

@ayeshaa-m ayeshaa-m linked an issue Mar 24, 2023 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Mar 24, 2023

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit 95ab3ce
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/641d9258dd1484000748d8f1
😎 Deploy Preview https://deploy-preview-1690--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ayeshaa-m ayeshaa-m self-assigned this Mar 24, 2023
@ayeshaa-m ayeshaa-m requested review from felix-ico and marvinLaubenstein and removed request for acstll March 24, 2023 07:30
@felix-ico
Copy link
Collaborator

Hi @ayeshaa-m I'm thinking if we should make this feature optional? I know that some users programmatically add rows to a data grid (for example by populating the data grid with API responses)... currently this implementation would go back to the first page every time a new row is added to the data-grid. What do you think?

@marvinLaubenstein
Copy link
Collaborator

@felix-ico Good point. We should make it optional

@ayeshaa-m
Copy link
Contributor Author

@felix-ico @acstll As discussed, the pagination is set to last page if new records are less than the previous records count.

Copy link
Collaborator

@felix-ico felix-ico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@ayeshaa-m ayeshaa-m changed the title fix: reset pagination offset if new records are rendered fix: reset pagination to last page if new records are rendered are less than previous Mar 24, 2023
@ayeshaa-m ayeshaa-m merged commit 1e45f88 into main Mar 24, 2023
@ayeshaa-m ayeshaa-m deleted the fix/data-grid-1527 branch March 24, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Grid: pagination reset needed
4 participants