fix:调用 filterTreeNode 方法时增加判断

This commit is contained in:
yangchch6 2019-06-17 10:17:43 +08:00
parent cc2a8a7932
commit abc8e22476
3 changed files with 3 additions and 3 deletions

View File

@ -516,7 +516,7 @@ var TreeNode = function (_React$Component) {
dragOverCls = 'drag-over-gap-bottom';
}
var filterCls = props.filterTreeNode(this) ? 'filter-node' : '';
var filterCls = props.filterTreeNode ? props.filterTreeNode(this) ? 'filter-node' : '' : '';
var noopSwitcher = function noopSwitcher() {
var _cls2;

View File

@ -1,6 +1,6 @@
{
"name": "bee-tree",
"version": "2.0.13",
"version": "2.0.14-beta.0",
"description": "Tree ui component for react",
"keywords": [
"react",

View File

@ -475,7 +475,7 @@ class TreeNode extends React.Component {
dragOverCls = 'drag-over-gap-bottom';
}
const filterCls = props.filterTreeNode(this) ? 'filter-node' : '';
const filterCls = props.filterTreeNode ? (props.filterTreeNode(this) ? 'filter-node' : '') : '';
const noopSwitcher = () => {
const cls = {