Skip to content

Commit 123b517

Browse files
committed
refactor: reorder
1 parent d193bb2 commit 123b517

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Selector/Input.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,16 @@ const Input: React.RefForwardingComponent<InputRef, InputProps> = (
7070
} = originProps;
7171

7272
inputNode = React.cloneElement(inputNode, {
73+
type: 'search',
74+
...originProps,
75+
76+
// Override over origin props
7377
id,
7478
ref: composeRef(ref, originRef as any),
7579
disabled,
7680
tabIndex,
7781
autoComplete: autoComplete || 'off',
78-
type: 'search',
82+
7983
autoFocus,
8084
className: classNames(`${prefixCls}-selection-search-input`, inputNode?.props?.className),
8185

@@ -92,9 +96,6 @@ const Input: React.RefForwardingComponent<InputRef, InputProps> = (
9296
readOnly: !editable,
9397
unselectable: !editable ? 'on' : null,
9498

95-
...originProps,
96-
97-
// Override over origin props
9899
style: { ...style, opacity: editable ? null : 0 },
99100

100101
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => {

0 commit comments

Comments
 (0)