How to use the antd.Form.createFormField function in antd

To help you get started, we’ve selected a few antd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zgbbiao / react-study-admin / src / views / register / index.js View on Github external
const mapPropsToFields = props => {
    let captcha = props.captcha
    captcha && captcha.value && captcha.errors && delete captcha.errors  // 当存在值的时候, 删除errors
    return {
        username: Form.createFormField({
            ...props.username,
        }),
        password: Form.createFormField({
            ...props.password
        }),
        confirm: Form.createFormField({
            ...props.confirm
        }),
        phone: Form.createFormField({
            ...props.phone
        }),
        captcha: Form.createFormField({
            ...props.captcha
        }),
        email: Form.createFormField({
            ...props.email
        })
    }
}
// value改变事件
github jingwhale / whale-kit / webapp / src / pages / componet / designsignifiers / component / componentForm / component / changeDataForm / index.js View on Github external
mapPropsToFields(props) {
    return {
      title: Form.createFormField({
        ...props.title,
        value: props.title.value,
      }),
      paramType: Form.createFormField({
        ...props.paramType,
        value: props.paramType.value,
      }),
      paramRule: Form.createFormField({
        ...props.paramRule,
        value: props.paramRule.value,
      }),
      valueList: Form.createFormField({
        ...props.valueList,
        value: props.valueList.value,
      }),
      paramIsNeed: Form.createFormField({
github getheimdall / heimdall / heimdall-frontend / src / components / apis / NewApiOverview.js View on Github external
const mapPropsToFields = (props) => {
    return {
        id: Form.createFormField({ ...props.api.id }),
        name: Form.createFormField({ ...props.api.name }),
        version: Form.createFormField({ ...props.api.version }),
        status: Form.createFormField({ ...props.api.status }),
        description: Form.createFormField({ ...props.api.description }),
        basePath: Form.createFormField({ ...props.api.basePath }),
        environments: Form.createFormField({ ...props.api.environments })
    }
}
github birkir / prime / packages / prime-ui / src / routes / schemas / components / EditField.tsx View on Github external
mapPropsToFields(props: any) {
    const { field } = props;
    const res: any = {
      name: Form.createFormField({ value: field.name }),
      title: Form.createFormField({ value: field.title }),
      description: Form.createFormField({ value: field.description }),
      type: Form.createFormField({ value: field.type }),
    };

    const fromAvailableField = props.availableFields.find((f: any) => f.type === field.type);

    const options = defaultsDeep(get(field, 'options', {}), get(fromAvailableField, 'options', {}));

    Object.entries(options).forEach(([key, value]) => {
      res[`options.${key}`] = Form.createFormField({ value });
    });

    res.optionsJson = Form.createFormField({ value: JSON.stringify(options) });

    return res;
  },
})(EditFieldBase);
github jingwhale / whale-kit / webapp / src / pages / componet / designsignifiers / component / componentForm / component / showDataForm / index.js View on Github external
...props.paramDefaultState,
        value: props.paramDefaultState.value,
      }),
      paramCurrentState: Form.createFormField({
        ...props.paramCurrentState,
        value: props.paramCurrentState.value,
      }),
      paramStateDes: Form.createFormField({
        ...props.paramStateDes,
        value: props.paramStateDes.value,
      }),
      eventDec: Form.createFormField({
        ...props.eventDec,
        value: props.eventDec.value,
      }),
      other: Form.createFormField({
        ...props.other,
        value: props.other.value,
      })
    };
  },
  onValuesChange(_, values) {
github jingwhale / whale-kit / webapp / src / pages / componet / designsignifiers / component / componentForm / component / functionDataForm / index.js View on Github external
mapPropsToFields(props) {
    return {
      title: Form.createFormField({
        ...props.title,
        value: props.title.value,
      }),
      valueList: Form.createFormField({
        ...props.valueList,
        value: props.valueList.value,
      }),
      isDoRule: Form.createFormField({
        ...props.isDoRule,
        value: props.isDoRule.value,
      }),
      paramDoRule: Form.createFormField({
        ...props.paramDoRule,
        value: props.paramDoRule.value,
      }),
      paramDefaultState: Form.createFormField({
        ...props.paramDefaultState,
        value: props.paramDefaultState.value,
      }),
      paramCurrentState: Form.createFormField({
        ...props.paramCurrentState,
        value: props.paramCurrentState.value,
      }),
      paramStateDes: Form.createFormField({
github voluntarily / vly2 / components / Org / OrgDetailForm.js View on Github external
mapPropsToFields (props) {
    const org = props.org
    if (!org.info) {
      org.info = {}
    }
    return {
      name: Form.createFormField({ ...org.name, value: org.name }),
      about: Form.createFormField({ ...org.info.about, value: org.info.about }),
      instructions: Form.createFormField({
        ...org.info.instructions,
        value: org.info.instructions
      }),
      followers: Form.createFormField({
        ...org.info.followers,
        value: org.info.followers
      }),
      joiners: Form.createFormField({
        ...org.info.joiners,
        value: org.info.joiners
      }),
      members: Form.createFormField({
        ...org.info.members,
        value: org.info.members
      }),
github voluntarily / vly2 / components / Welcome / ConfirmDetails.js View on Github external
...props.person.phone,
        value: props.person.phone
      }),
      pronoun: Form.createFormField({
        ...props.person.pronoun,
        value: props.person.pronoun
      }),
      imgUrl: Form.createFormField({
        ...props.person.imgUrl,
        value: props.person.imgUrl
      }),
      role: Form.createFormField({
        ...props.person.role,
        value: props.person.role
      }),
      status: Form.createFormField({
        ...props.person.status,
        value: props.person.status
      }),
      tags: Form.createFormField({
        ...props.person.tags,
        value: props.person.tags
      })
    }
  },
  onValuesChange (_, values) {
github voluntarily / vly2 / components / Org / OrgDetailForm.js View on Github external
return {
      name: Form.createFormField({ ...org.name, value: org.name }),
      about: Form.createFormField({ ...org.info.about, value: org.info.about }),
      instructions: Form.createFormField({
        ...org.info.instructions,
        value: org.info.instructions
      }),
      followers: Form.createFormField({
        ...org.info.followers,
        value: org.info.followers
      }),
      joiners: Form.createFormField({
        ...org.info.joiners,
        value: org.info.joiners
      }),
      members: Form.createFormField({
        ...org.info.members,
        value: org.info.members
      }),
      outsiders: Form.createFormField({
        ...org.info.outsiders,
        value: org.info.outsiders
      }),
      imgUrl: Form.createFormField({ ...org.imgUrl, value: org.imgUrl }),
      website: Form.createFormField({ ...org.website, value: org.website }),
      contactEmail: Form.createFormField({
        ...org.contactEmail,
        value: org.contactEmail
      }),
      facebook: Form.createFormField({ ...org.facebook, value: org.facebook }),
      twitter: Form.createFormField({ ...org.twitter, value: org.twitter }),
      category: Form.createFormField({ ...org.category, value: org.category }),