fix: selectable为 false 时,回车不选中节点
This commit is contained in:
parent
8db7c124b3
commit
c8f3a8ddca
|
@ -718,6 +718,7 @@ var Tree = function (_React$Component) {
|
|||
|
||||
var props = this.props;
|
||||
var currentPos = treeNode.props.pos;
|
||||
var selectable = treeNode.props.selectable;
|
||||
var currentIndex = currentPos.substr(currentPos.lastIndexOf('-') + 1);
|
||||
//向下键down
|
||||
if (e.keyCode == _tinperBeeCore.KeyCode.DOWN) {
|
||||
|
@ -738,7 +739,7 @@ var Tree = function (_React$Component) {
|
|||
if (props.onDoubleClick) {
|
||||
this.onDoubleClick(treeNode);
|
||||
} else {
|
||||
this.onSelect(treeNode);
|
||||
selectable && this.onSelect(treeNode);
|
||||
props.checkable && this.onCheck(treeNode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35000,6 +35000,7 @@
|
|||
|
||||
var props = this.props;
|
||||
var currentPos = treeNode.props.pos;
|
||||
var selectable = treeNode.props.selectable;
|
||||
var currentIndex = currentPos.substr(currentPos.lastIndexOf('-') + 1);
|
||||
//向下键down
|
||||
if (e.keyCode == _tinperBeeCore.KeyCode.DOWN) {
|
||||
|
@ -35020,7 +35021,7 @@
|
|||
if (props.onDoubleClick) {
|
||||
this.onDoubleClick(treeNode);
|
||||
} else {
|
||||
this.onSelect(treeNode);
|
||||
selectable && this.onSelect(treeNode);
|
||||
props.checkable && this.onCheck(treeNode);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -660,6 +660,7 @@ onExpand(treeNode,keyType) {
|
|||
|
||||
const props = this.props;
|
||||
const currentPos = treeNode.props.pos;
|
||||
const selectable = treeNode.props.selectable;
|
||||
const currentIndex = currentPos.substr(currentPos.lastIndexOf('-')+1);
|
||||
//向下键down
|
||||
if(e.keyCode == KeyCode.DOWN){
|
||||
|
@ -680,7 +681,7 @@ onExpand(treeNode,keyType) {
|
|||
if(props.onDoubleClick) {
|
||||
this.onDoubleClick(treeNode);
|
||||
} else {
|
||||
this.onSelect(treeNode);
|
||||
selectable && this.onSelect(treeNode);
|
||||
props.checkable && this.onCheck(treeNode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue