AllenFang / AllenFang/react-bootstrap-table

React bootstrap table data is not displaying while using "map" function to create dynamically

Đang mở
#2,004 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
2.2k
Fork
761
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi there,
I have the following code :
constructor(props) {
super(props);
this.state = {
tableData: [
{ "friendlyName": "John", "platform": "IOS", "userName": "John Fedrick", "enrollment": "true", "compliant": "true", "lastSeen": "2018-08-04" },
{ "friendlyName": "John", "platform": "IOS", "userName": "John Fedrick", "enrollment": "true", "compliant": "true", "lastSeen": "2018-08-04" } ]
};
}

and in render method :
const columns = ["Friendly Name", "Platform", "User Name", "Enrollment Status", "Compliant Status", "Last Seen"];

{columns.map(column =>
{column}
)}

There was no error in the console.
I was able to get the column headings in the table but table body is empty with empty rows.

Any of u can pls help me on this??

Thanks in advance

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.