Skip to content

Commit b662f1c

Browse files
committed
chore: Avoid render icon if renderFunc return null
1 parent 5e3ecd0 commit b662f1c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Select.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ export type SelectProps<ValueType extends DefaultValueType = DefaultValueType> =
7272
* we have to wrap an class component to handle this.
7373
*/
7474
class Select<VT> extends React.Component<SelectProps<SelectOptionsType, VT>> {
75-
static Option: typeof Option;
75+
static Option = Option;
7676

77-
static OptGroup: typeof OptGroup;
77+
static OptGroup = OptGroup;
7878

7979
selectRef = React.createRef<RefSelectProps>();
8080

src/interface/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { Key } from './generator';
33

4-
export type RenderNode = React.ReactNode | (() => React.ReactNode);
4+
export type RenderNode = React.ReactNode | ((props: any) => React.ReactNode);
55

66
export type Mode = 'multiple' | 'tags' | 'combobox';
77

0 commit comments

Comments
 (0)