fix: remove this.isIn
This commit is contained in:
parent
1e4cada695
commit
e79d90ac27
15
src/Tree.js
15
src/Tree.js
|
@ -755,7 +755,7 @@ onExpand(treeNode,keyType) {
|
|||
const targetDom = e.target;
|
||||
|
||||
// 如果当前tree节点不包括上一个焦点节点会触发此方法
|
||||
if(this.tree == targetDom && !this.isIn && !this.tree.contains(e.relatedTarget)){
|
||||
if(this.tree == targetDom && !this.tree.contains(e.relatedTarget)){
|
||||
const {onFocus, children} = this.props;
|
||||
const {selectedKeys=[]} = this.state;
|
||||
let tabIndexKey = selectedKeys[0]
|
||||
|
@ -784,17 +784,6 @@ onExpand(treeNode,keyType) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
onUlMouseEnter(e){
|
||||
this.isIn = true;
|
||||
// console.log('onUlMouseEnter----isIn-----',this.isIn);
|
||||
}
|
||||
onUlMouseLeave(e){
|
||||
this.isIn = false;
|
||||
// console.log('onUlMouseLeave----isIn-----',this.isIn);
|
||||
|
||||
}
|
||||
|
||||
getFilterExpandedKeys(props, expandKeyProp, expandAll) {
|
||||
const keys = props[expandKeyProp];
|
||||
if (!expandAll && !props.autoExpandParent) {
|
||||
|
@ -1176,8 +1165,6 @@ onExpand(treeNode,keyType) {
|
|||
|
||||
if (focusable) {
|
||||
domProps.onFocus = this.onUlFocus;
|
||||
domProps.onMouseEnter = this.onUlMouseEnter;
|
||||
domProps.onMouseLeave = this.onUlMouseLeave;
|
||||
}
|
||||
|
||||
// if (props.focusable) {
|
||||
|
|
Loading…
Reference in New Issue