Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Commit 5c89398

Browse files
committed
change rest spread to the last
1 parent b9e535b commit 5c89398

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ const RHFInput = React.memo(
101101
}, [register, unregister, name]); // eslint-disable-line react-hooks/exhaustive-deps
102102

103103
return React.cloneElement(as, {
104-
...rest,
105104
...(onChangeEvent
106105
? { [onChangeName || 'onChange']: eventWrapper(onChangeEvent) }
107106
: { onChange: handleChange }),
@@ -112,6 +111,7 @@ const RHFInput = React.memo(
112111
: {}),
113112
value: value || inputValue,
114113
...(isCheckbox ? { checked: inputValue } : {}),
114+
...rest,
115115
});
116116
},
117117
);

0 commit comments

Comments
 (0)