react-magma icon indicating copy to clipboard operation
react-magma copied to clipboard

Bug: Issue with pagination control, rows per page, on Table and Datagrid

Open orion-cengage opened this issue 1 year ago • 1 comments

Issue:

Looks like this issue was introduced in v4.3.0. Everything is working as intended in v4.2.0

Table pagination: https://react-magma.cengage.com/version/4.3.0/api/table/#pagination

The table pagination starts at 10 rows per page. If you change that to a different value using the select, the number of rows shown updates correctly, but the select still shows as 10 selected.

https://github.com/cengage/react-magma/assets/24397282/babfa1c0-a366-4015-9dbd-13eb9183f813

Datagrid: https://react-magma.cengage.com/version/4.3.0/api/datagrid/

The way this is showing on Datagrid is slightly different. On the very first example in the documentation, the pagination is set to 10 rows per page, but all 25 rows in the example are already showing by default. If you change the value to 20 or some other value, the table itself updates correctly, but the select in the pagination remains set at 10, just like the regular table component.

image

orion-cengage avatar Feb 27 '24 13:02 orion-cengage

PR https://github.com/cengage/react-magma/pull/1159 introduced this bug when we changed NativeSelect.

silvalaura avatar Feb 27 '24 15:02 silvalaura

This ticket correctly addresses the first issue. However, the weirdness with our DataGrid example noted above has not been addressed.

silvalaura avatar Apr 15 '24 17:04 silvalaura

Confirmed Datagrid issue has been addressed ✅

silvalaura avatar Apr 24 '24 15:04 silvalaura