score:0

maybe try binding your table? it has to be a function though

const table = () => (
[
  {
    resizable: false,
    width: 50,
    cell: ({ original }) => {
      const { pageactivity, pagenumber } = this.state;
      const currentpageactivityrow = {
        ...get(pageactivity[pagenumber], "selectedrows")
      };
      return (
        <checkbox
          checked={currentpageactivityrow[original.id] === true}
          onchange={() => this.selectrows(original.id)}
        />
      );
    }
  },
  {
    header: "contact id",
    accessor: "id"
  }
];
)

// tablecomponent.js

constructor(props){
    super(props);
    this.state = {
      pagenumber: 1,
      search: "",
      error: "",
      dialogopen: false,
      isfileractive: false,
      selectedfilters: {},
      pageactivity: {}
    };

    this.columns = table.bind(this);
  }

Related Query

More Query from same tag