1
- import * as React from 'react' ;
2
- import KeyCode from 'rc-util/lib/KeyCode' ;
3
- import useMemo from 'rc-util/lib/hooks/useMemo' ;
4
- import type { RefOptionListProps } from 'rc-select/lib/OptionList' ;
5
1
import { useBaseProps } from 'rc-select' ;
2
+ import type { RefOptionListProps } from 'rc-select/lib/OptionList' ;
6
3
import type { TreeProps } from 'rc-tree' ;
7
4
import Tree from 'rc-tree' ;
8
5
import type { EventDataNode , ScrollTo } from 'rc-tree/lib/interface' ;
9
- import type { TreeDataNode , Key } from './interface' ;
6
+ import KeyCode from 'rc-util/lib/KeyCode' ;
7
+ import useMemo from 'rc-util/lib/hooks/useMemo' ;
8
+ import * as React from 'react' ;
10
9
import LegacyContext from './LegacyContext' ;
11
10
import TreeSelectContext from './TreeSelectContext' ;
11
+ import type { Key , TreeDataNode } from './interface' ;
12
12
import { getAllKeys , isCheckDisabled } from './utils/valueUtil' ;
13
13
14
14
const HIDDEN_STYLE = {
@@ -30,7 +30,7 @@ interface TreeEventInfo {
30
30
31
31
type ReviseRefOptionListProps = Omit < RefOptionListProps , 'scrollTo' > & { scrollTo : ScrollTo } ;
32
32
33
- const OptionList : React . RefForwardingComponent < ReviseRefOptionListProps > = ( _ , ref ) => {
33
+ const OptionList : React . ForwardRefRenderFunction < ReviseRefOptionListProps > = ( _ , ref ) => {
34
34
const { prefixCls, multiple, searchValue, toggleOpen, open, notFoundContent } = useBaseProps ( ) ;
35
35
36
36
const {
@@ -258,6 +258,9 @@ const OptionList: React.RefForwardingComponent<ReviseRefOptionListProps> = (_, r
258
258
} ;
259
259
260
260
const RefOptionList = React . forwardRef < ReviseRefOptionListProps > ( OptionList ) ;
261
- RefOptionList . displayName = 'OptionList' ;
261
+
262
+ if ( process . env . NODE_ENV !== 'production' ) {
263
+ RefOptionList . displayName = 'OptionList' ;
264
+ }
262
265
263
266
export default RefOptionList ;
0 commit comments