1.0.0 • Published 3 years ago

@9troisquarts/antd-form.ant-form v1.0.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
3 years ago

AntForm

AntForm is a component allowing you to easily build form with schema

bit

bit import 9troisquarts.antd-form/ant-form

yarn/npm

npm config set '@9troisquarts:registry' https://node.bit.dev

yarn add @ant-form/ant-form
OR
npm i @ant-form/ant-form

Usage/Examples

import AntForm from '@ant-form/ant-form';

function App() {
  return (
      <AntForm
        schema={[]}
        object={{}}
      />
  )
}

API Reference

AntForm Props

All AntDesign Form props is available on AntForm

ParameterTypeDescriptionDefault
actionsWrapperProps object Props of the div wrapping actions-
errors objectSet the current errors of the object (See example) -
extraActions Array\<React.Component> Extra actions displayed at the left of the submit button -
loadingbooleanSet the loading state of submit buttonfalse
objectobjectrequired Object used in form-
onChangefunction(changedField, allFields)Trigger when field updated-
onSubmitfunction(allFields)Triger after submitting the form, submit button will be hide if not provided-
readOnlyboolean Set the readonly state of the form false
 rowPropsRowPropsSet the props on rows surrounded each fields group-
 schema Schemarequired Set the schema used by the form-
submitButtonPropsButtonProps Submit button props -
submitTextstring Change the text in the submit buttonSave 

Available fields type

  • Rate
  • Select
  • String / Text
  • Number
  • Radio
  • Autocomplete
  • Upload
  • Checkbox / Checkboxes
  • Slider
  • Switch
  • Date
  • List