AllenFang / AllenFang/react-bootstrap-table

Uncaught TypeError: Cannot read property 'props' of null

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

描述

Hey, I migrated from `3.5.1` to `4.3.1` and I am having error:

`Uncaught TypeError: Cannot read property 'props' of null`

Some of my Columns might be null in some cases and I think this is the issue. Error fires at BootstrapTable.js:
```
// If columns changed, clean removed columns that had filters
if (props.children !== this.props.children && this.filter) {
var nextDataFields = _react2.default.Children.map(props.children, function (column) {
return column.props.dataField;
});
_react2.default.Children.forEach(this.props.children, function (column) {
var _column$props = column.props,
dataField = _column$props.dataField,
filter = _column$props.filter;

if (filter && !nextDataFields.includes(dataField)) {
// Clear filter
_this2.filter.handleFilter(dataField, '', filter.type, filter);
}
});
}

```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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