AllenFang / AllenFang/react-bootstrap-table

insertRow={true} causes Invariant Violation: Objects are not valid as a React child

未關閉
#1,739 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
in progress
主要語言
JavaScript
星號
2.2k
分支
761
PR 合併指標
30 天內沒有已合併 PR

描述

I have upgraded a React app from 15.6.2 to 16.0.0, and updated react-boostrap-table too.

If my JSX looks like:

```

ID
Type

```

Then it fails to render.

I get this console message:

```
Invariant Violation: Objects are not valid as a React child (found: object with keys {$$typeof, key, children, containerInfo, implementation}). If you meant to render a collection of children, use an array instead.
in Modal
in div
in ToolBar
in div
in div
in BootstrapTable
in div
in div
in div
```
If I remove the insertRow attribute, the error goes away, and the component will render again.

I was relying on insertRow to provide UI to add new data, it would be a shame to have to roll my own.

It is helps, licenceTypes is a very simple array:

```
licenceTypes: [{id:1, title: "MIT"}, {id:2, title: "Apache-2.0"}]
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。