0

enter image description hereenter image description here

The Bootstrap Table header is not aligned with the data, am I missing any style? I'm using

import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';

I have marked in the attached picture where this.setState is not working in a function within private method.

Mostafa
  • 169
  • 1
  • 3
  • 12
  • `this` has different behavior when referenced from within a standard function as compared to from within an arrow function. Have you tried defining `deleteRecord` as an arrow function? (i.e., instead of `function deleteRecord(row: { id: string; }) {` , use `deleteRecord = (row: { id: string; }) => {` ) – Eric King Jun 21 '18 at 22:44
  • 1
    `this.setState` is not accessible because you enclose it with a `function(){}` inside another function. Try saving `const self = this` in the parent function and then inside the child function `self.setState()` – Alexander Vitanov Jun 21 '18 at 22:50

2 Answers2

0

I've fixed the header alignment issue by

import 'react-bootstrap-table/dist/react-bootstrap-table-all.min.css';
Mostafa
  • 169
  • 1
  • 3
  • 12
0

exists possibility and using default Bootstrap code in need component, but in this case you must use CDN links who is need for normal work of Bootstrap from index.html file in your app