diff --git a/components/form/hooks/useForm.ts b/components/form/hooks/useForm.ts index 60d87383fc..a553a58902 100644 --- a/components/form/hooks/useForm.ts +++ b/components/form/hooks/useForm.ts @@ -50,7 +50,7 @@ export default function useForm(form?: FormInstance): [For scrollMode: 'if-needed', block: 'nearest', ...options, - }); + } as any); } }, getFieldInstance: (name: NamePath) => { diff --git a/components/form/interface.ts b/components/form/interface.ts index 53a4a0a86e..d153f37222 100644 --- a/components/form/interface.ts +++ b/components/form/interface.ts @@ -1,3 +1,3 @@ -export { InternalNamePath, NamePath, Store, StoreValue } from 'rc-field-form/lib/interface'; -export { Options as ScrollOptions } from 'scroll-into-view-if-needed'; +export type { InternalNamePath, NamePath, Store, StoreValue } from 'rc-field-form/lib/interface'; +export type { Options as ScrollOptions } from 'scroll-into-view-if-needed'; export type FormLabelAlign = 'left' | 'right'; diff --git a/package.json b/package.json index a18fbea8d9..8fa0920a51 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "rc-trigger": "^5.2.10", "rc-upload": "~4.3.0", "rc-util": "^5.25.2", - "scroll-into-view-if-needed": "^2.2.25", + "scroll-into-view-if-needed": "^3.0.3", "shallowequal": "^1.1.0" }, "devDependencies": {