File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 43
43
"dependencies" : {
44
44
"@babel/runtime" : " ^7.10.1" ,
45
45
"classnames" : " 2.x" ,
46
- "rc-select" : " ~14.13 .0" ,
46
+ "rc-select" : " ~14.14 .0" ,
47
47
"rc-tree" : " ~5.8.1" ,
48
48
"rc-util" : " ^5.16.1"
49
49
},
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import React from 'react';
5
5
import TreeSelect , { TreeNode } from '../src' ;
6
6
import focusTest from './shared/focusTest' ;
7
7
import { selectNode } from './util' ;
8
+ import type { BaseSelectRef } from 'rc-select' ;
8
9
9
10
const mockScrollTo = jest . fn ( ) ;
10
11
@@ -628,4 +629,10 @@ describe('TreeSelect.basic', () => {
628
629
wrapper . selectNode ( 1 ) ;
629
630
expect ( onChange ) . toHaveBeenCalledWith ( [ 'leaf1' ] , expect . anything ( ) , expect . anything ( ) ) ;
630
631
} ) ;
632
+
633
+ it ( 'nativeElement' , ( ) => {
634
+ const treeSelectRef = React . createRef < BaseSelectRef > ( ) ;
635
+ const { container } = render ( < TreeSelect ref = { treeSelectRef } /> ) ;
636
+ expect ( treeSelectRef . current . nativeElement ) . toBe ( container . querySelector ( '.rc-tree-select' ) ) ;
637
+ } ) ;
631
638
} ) ;
You can’t perform that action at this time.
0 commit comments