Mui-datatables: [Bug] Option rowsPerPage flush when using controlled selected rows

Created on 11 Nov 2018  路  2Comments  路  Source: gregnb/mui-datatables


When using mui-datatables with controlled selected rows (pass rowsSelected and onRowsSelect) there is problem, when we change rows per page and then select row, option rows per page sets to default value

Expected Behavior


Rows per page don't flush to default values

Current Behavior


Rows per page flush to default values

Steps to Reproduce (for bugs)


Live example: https://codesandbox.io/embed/pm225rwwjx

  1. Change rows per page from 10 to 15
  2. Select some row with checkbox
  3. Boom! Rows per page flush to default value - 10

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | 1.4.0 |
| MUI-datatables | 2.0.0-beta-38 |
| React | 16.5.0 |
| browser | Chrome |

Most helpful comment

There is a workaround to fix this problem.
You can pass rowsPerPage and onChangeRowsPerPage, and component mui-datatables will use them.

Example
https://codesandbox.io/embed/jjo6wr45r3

All 2 comments

There is a workaround to fix this problem.
You can pass rowsPerPage and onChangeRowsPerPage, and component mui-datatables will use them.

Example
https://codesandbox.io/embed/jjo6wr45r3

This issue has been fixed and should no longer be present in 2.4.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harryluo91 picture harryluo91  路  3Comments

Aankhen picture Aankhen  路  3Comments

NickToye picture NickToye  路  4Comments

gangakrishh picture gangakrishh  路  3Comments

kylane picture kylane  路  3Comments