How to use the rc-form/lib/createDOMForm function in rc-form

To help you get started, we’ve selected a few rc-form 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 ant-design / ant-design / components / form / index.jsx View on Github external
Form.create = (o = {}) => {
  const options = {
    ...o,
    fieldNameProp: 'id',
    fieldMetaProp: FIELD_META_PROP,
  };
  const formWrapper = createDOMForm(options);

  /* eslint-disable react/prefer-es6-class */
  return (Component) => formWrapper(React.createClass({
    propTypes: {
      form: PropTypes.object.isRequired,
    },
    childContextTypes: {
      form: PropTypes.object.isRequired,
    },
    getChildContext() {
      return {
        form: this.props.form,
      };
    },
    render() {
      return ;

rc-form

React High Order Form Component

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis