4.3.2 • Published 1 year ago
@drieam/final-form-antd v4.3.2
@drieam/final-form-antd
Convenient components and hooks for using React Final Form in combination with Ant Design.
Installation
Install @drieam/final-form-antd
and its peer dependencies:
$ pnpm add @drieam/final-form-antd antd final-form react-final-form
Usage
An example of how to use the different components:
import { Form } from "react-final-form";
import { FormContent, FormItem, InputField, SubmitButton } from "@drieam/final-form-antd";
const Example = () => {
const onSubmit = useCallback(async (values) => {
console.log(values);
return undefined;
}, []);
return (
<Form onSubmit={onSubmit}>
{({ handleSubmit }) => (
<FormContent handleSubmit={handleSubmit}>
<FormItem name="name" label="Name">
<InputField />
</FormItem>
<SubmitButton>Save</SubmitButton>
</FormContent>
)}
</Form>
);
}
Components and hooks
- Components
FormAlertError
FormContent
FormDebug
FormItem
SubmitButton
- Inputs:
InputField
InputNumberField
SelectField
SwitchField
TextAreaField
- Hooks
useFieldProps
useFieldSelectProps
useFormItem
4.3.2
1 year ago
4.3.1
1 year ago
4.3.0
1 year ago
4.2.4
1 year ago
4.2.3
1 year ago
4.2.2
1 year ago
4.2.1
1 year ago
4.1.0
2 years ago
4.2.0
2 years ago
4.1.1
2 years ago
4.0.0
2 years ago
3.3.1
3 years ago
3.3.0
3 years ago
3.2.0
3 years ago
3.1.1
3 years ago
3.1.0
3 years ago
3.0.1
3 years ago
3.0.0
4 years ago
2.3.0
4 years ago
2.2.0
4 years ago
2.1.0
4 years ago
2.0.0
4 years ago