Skip to content

Commit

Permalink
fix(form): reset失败如果initialdata是undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
carolin913 committed Mar 22, 2022
1 parent 88627e9 commit b3ab31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/form/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const FormItem = forwardRef<HTMLDivElement, FormItemProps>((props, ref) => {

function getResetValue(resetType: string): ValueType {
if (resetType === 'initial' && 'initialData' in props) {
return initialData;
return getDefaultInitialData(children, initialData);
}

let emptyValue: ValueType = '';
Expand Down

0 comments on commit b3ab31a

Please sign in to comment.