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 table pagination setting #9324

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

GilbertCherrie
Copy link
Member

Fixed issues with table pagination settings.

  1. The 5 items per page option was missing on the table even though the settings page contains this as an option.
  2. When selecting an option on the settings page for items per page it wasn't actually being applied to the tables in the UI.

Before:
The default items per page on the settings page was not actually being applied on the tables in the UI.
Screenshot 2025-01-13 at 11 53 57 AM

As seen here the table defaults to 20 items per page even though in the settings it was set to 10.
Screenshot 2025-01-13 at 11 55 44 AM

Also, 5 items per page is not an option here even though it is on the settings page.
Screenshot 2025-01-13 at 11 56 25 AM

After:
Screenshot 2025-01-13 at 11 59 55 AM
Screenshot 2025-01-13 at 12 00 00 PM

@GilbertCherrie GilbertCherrie force-pushed the fix_table_pagination_setting branch from 4121032 to 4a5b3d4 Compare January 14, 2025 18:52
@@ -273,7 +273,7 @@ const setPaging = (settings, start, perPage) => ({
const computePagination = (settings) => ({
page: settings.current,
perPage: settings.perpage,
perPageOptions: [10, 20, 50, 100, 200, 500, 1000],
perPageOptions: [5, 10, 20, 50, 100, 200, 500, 1000],
Copy link
Member

Choose a reason for hiding this comment

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

As discussed, this was added to match the Setting side, where 5 is already a choice.

@Fryguy Fryguy merged commit f94b162 into ManageIQ:master Jan 14, 2025
15 checks passed
@GilbertCherrie GilbertCherrie deleted the fix_table_pagination_setting branch January 14, 2025 19:33
@GilbertCherrie
Copy link
Member Author

Note, the ruby changes were removed from this pr as we decided the report and report detail page will use the reports items per page value. If we want the report list to use the list value then as a follow up pr we would need to change the tables dbname value.

@Fryguy
Copy link
Member

Fryguy commented Jan 16, 2025

Backported to radjabov in commit f94e33c.

commit f94e33cd82560f61883cd319e1c73f990f89f8df
Author: Jason Frey <[email protected]>
Date:   Tue Jan 14 14:03:17 2025 -0500

    Merge pull request #9324 from GilbertCherrie/fix_table_pagination_setting
    
    Fix table pagination setting
    
    (cherry picked from commit f94b1625d20d80762e70f416c9031be021ba6253)

Fryguy added a commit that referenced this pull request Jan 16, 2025
…ting

Fix table pagination setting

(cherry picked from commit f94b162)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants