SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
580 stars 353 forks source link

Obsidian Grid Does Not Calculate Number of Pages Correctly #5958

Closed JimMichael closed 3 months ago

JimMichael commented 4 months ago

Description

The "pagination" control (or whatever it's called) in the new Obsidian Grid does not calculate correctly when you change the Grid size.

Actual Behavior

If you have a grid with > 50 rows, and the "grid size" is set to 50, the pagination control shows and works as expected.

image

But if you subsequently set the grid size to 5000 (and you have < 5000 rows, so ALL of them would fit on one single page), the pagination control still shows the same number of pages it did when the grid size was 50. image

Expected Behavior

Number of pages would accurately reflect the number of rows on the grid per the grid size drop-down. If set to 500 or 5000 and all rows would fit onto that grid, the pagination control should not show multiple, empty pages to choose.

Steps to Reproduce

I used the new Obsidian Page Route List block as that's where I first noticed this problem, but it happens on every Obsidian grid I've tried.

  1. Go to Admin | CMS Config | Routes

  2. Use the Zone editor to verify the Route List block is the new Obsidian version

  3. Make sure you're not filtering the grid so all rows display image

  4. Scroll to bottom of grid and observe that it's using a Page Size of 50, and that there are multiple pages to navigate to.

  5. Change the grid size to 5000 and observe that while all rows are now on the same (single) page, the pagination control still shows the same number of pages as it did when the grid size was 50.

  6. Trying to navigate to pages 2+ shows an empty grid.

Issue Confirmation

Rock Version

1.16.6.1

Client Culture Setting

en-US