1

I am using the material-table component and am using the stepped pagination style. It works, but produces some console warnings:

Warning: Each child in a list should have a unique "key" prop.

Failed prop type: Invalid prop variant of value default supplied to ForwardRef(Button), expected one of ["text","outlined","contained"].

I've tried using various other options related to pagination such as pageSize, pageSizeOptions, and showFirstLastPageButtons to eliminate the warning.

  options={{
    pageSize: 5,
    pageSizeOptions: [],
    paginationType: 'stepped',
    showFirstLastPageButtons: false,
  }}
Community
  • 1
  • 1
  • Welcome to stackoverflow Josh! Can you provide a more thorough example? Normally the first warning occurs because you're not setting the `key` property when enumerating an array. Here's an excellent [post](https://stackoverflow.com/questions/28329382/understanding-unique-keys-for-array-children-in-react-js) that gives more info – bflemi3 Jun 21 '19 at 19:06
  • Hi, thanks for your comment. I'm familiar with the warning and how to fix it in my own code, but this warning is being produced internally to material-table and I believe this is a bug. It was suggested in the material-table community that I post it here. – Josh Painter Jun 26 '19 at 16:47
  • If this is a bug with `material-table` then it should be posted in their github repo. Sorry for the run-around, not sure why they're pointing you here unless they believe it's an issue with your implementation. Could you add a link to the github issue you created? – bflemi3 Jun 27 '19 at 13:48
  • Sure, here is the link to the issue on Github: https://github.com/mbrn/material-table/issues/746 – Josh Painter Jun 28 '19 at 16:26

0 Answers0