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

[Feature]: Allow setting page size manually for a table #36290

Closed
1 task done
nikguhl89 opened this issue Sep 12, 2024 · 4 comments
Closed
1 task done

[Feature]: Allow setting page size manually for a table #36290

nikguhl89 opened this issue Sep 12, 2024 · 4 comments
Assignees
Labels
Community Reported issues reported by community members Enhancement New feature or request Table Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@nikguhl89
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Summary

This feature would allow a user to set the page size for a table manually to a value that would work for their use case. This is available on a lot of other editors, but is not yet on appsmith. This would also allow for onPageChange events to trigger when the page was changed.

Why should this be worked on?

I am writing an application to pull in game deal information. The api I am using only processes 25 results per request. I was going to limit my page results to 25 so I could just run the api call per page of 25 items. This would also make things easier for api's that return a large amount of data so that the table can display the results more customized for the user experience.

@nikguhl89 nikguhl89 added the Enhancement New feature or request label Sep 12, 2024
@LagunaElectric LagunaElectric added Table Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators labels Sep 12, 2024
@LagunaElectric LagunaElectric added the Community Reported issues reported by community members label Sep 12, 2024
@github-actions github-actions bot added the Widgets Product This label groups issues related to widgets label Sep 12, 2024
@Nikhil-Nandagopal
Copy link
Contributor

@nikguhl89 generally most APIs accept a limit parameter which you can bind to the table page size. If your API has a hardcoded number, you have to manually increase the size of your table to make 25 rows and this will work. Let me know if you are facing any issues with this

@nikguhl89
Copy link
Author

Thank you for the update, looks like everything is functioning correctly. Is it possible to have an event run on page change without using server-side pagination?

@Nikhil-Nandagopal
Copy link
Contributor

@nikguhl89 actually it will trigger onPageChange even if server side pagination is off. Turn it on, configure on page change, turn it off. it should still work

@nikguhl89
Copy link
Author

So the current issue I am running into is that the api I am using can only process 25 items at a time, when using client side pagination it still returns all results (currently 40) and it will try to process and fail even with the page size set at 25 or under. Is there any way around this while still using the pagination within the table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Reported issues reported by community members Enhancement New feature or request Table Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

6 participants