4.2.4 • Published 8 days ago

@drieam/final-form-antd v4.2.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 days ago

@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.2.4

8 days ago

4.2.3

9 days ago

4.2.2

15 days ago

4.2.1

15 days ago

4.1.0

10 months ago

4.2.0

9 months ago

4.1.1

10 months ago

4.0.0

1 year ago

3.3.1

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago