diff --git a/components/form/demo/basic.tsx b/components/form/demo/basic.tsx index a64ed1f2d4..087d2b88b3 100644 --- a/components/form/demo/basic.tsx +++ b/components/form/demo/basic.tsx @@ -9,6 +9,12 @@ const onFinishFailed = (errorInfo: any) => { console.log('Failed:', errorInfo); }; +type FieldType = { + username?: string; + password?: string; + remember?: string; +}; + const App: React.FC = () => (
( onFinishFailed={onFinishFailed} autoComplete="off" > - label="Username" name="username" rules={[{ required: true, message: 'Please input your username!' }]} @@ -28,7 +34,7 @@ const App: React.FC = () => ( - label="Password" name="password" rules={[{ required: true, message: 'Please input your password!' }]} @@ -36,7 +42,11 @@ const App: React.FC = () => ( - + + name="remember" + valuePropName="checked" + wrapperCol={{ offset: 8, span: 16 }} + > Remember me diff --git a/package.json b/package.json index f90ab9dffd..7e03cebafd 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "rc-dialog": "~9.1.0", "rc-drawer": "~6.2.0", "rc-dropdown": "~4.1.0", - "rc-field-form": "~1.35.0", + "rc-field-form": "~1.36.0", "rc-image": "~7.1.0", "rc-input": "~1.1.0", "rc-input-number": "~8.0.2",