material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Stepped pagination produces React warnings

Open jmpainter opened this issue 7 years ago • 3 comments

Describe the bug When using the option paginationType: 'stepped', a couple of React warnings appear in the console: 'Warning: Each child in a list should have a unique "key" prop.' and ' Failed prop type: Invalid prop variant of value default supplied to ForwardRef(Button), expected one of ["text","outlined","contained"].'

To Reproduce Using react 16.8.5, material-table 1.39.2 Steps to reproduce the behavior:

  1. Set the option paginationType: 'stepped' for a table
  2. Look at the console to see the above React warnings

jmpainter avatar Jun 21 '19 18:06 jmpainter

Experiencing the same issue with the steps above

buhrenduh avatar Jun 25 '19 23:06 buhrenduh

I've reproduced the issue here: https://codesandbox.io/s/recursing-archimedes-91pdm

import React from "react";
import ReactDOM from "react-dom";
import MaterialTable from "material-table";

function App() {
  return (
    <MaterialTable
      title="Basic Export Preview"
      columns={[
        { title: "Name", field: "name" },
        { title: "Surname", field: "surname" },
        { title: "Birth Year", field: "birthYear", type: "numeric" },
        {
          title: "Birth Place",
          field: "birthCity",
          lookup: { 34: "İstanbul", 63: "Şanlıurfa" }
        }
      ]}
      data={[
        { name: "Mehmet", surname: "Baran", birthYear: 1987, birthCity: 63 },
        {
          name: "Zerya Betül",
          surname: "Baran",
          birthYear: 2017,
          birthCity: 34
        }
      ]}
      options={{
        paginationType: "stepped"
      }}
    />
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

Flixbox avatar Jul 08 '19 08:07 Flixbox

I am facing this issue. I am using the MT version 1.50.0.

SreekarMouli98 avatar Sep 14 '19 16:09 SreekarMouli98