How to use the schema-typed.SchemaModel function in schema-typed

To help you get started, we’ve selected a few schema-typed 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 rsuite / rsuite / src / Form / Form.tsx View on Github external
formError: PropTypes.object,
    checkDelay: PropTypes.number,
    checkTrigger: PropTypes.oneOf(['change', 'blur', 'none']),
    onChange: PropTypes.func,
    onError: PropTypes.func,
    onCheck: PropTypes.func,
    model: PropTypes.object,
    classPrefix: PropTypes.string,
    errorFromContext: PropTypes.bool,
    children: PropTypes.node,
    readOnly: PropTypes.bool,
    plaintext: PropTypes.bool
  };
  static defaultProps = {
    classPrefix: defaultClassPrefix('form'),
    model: SchemaModel({}),
    layout: 'vertical',
    formDefaultValue: {},
    checkDelay: 500,
    checkTrigger: 'change',
    errorFromContext: true
  };

  formContextValue = null;

  constructor(props: FormProps) {
    super(props);
    const { formDefaultValue, formError } = this.props;

    this.state = {
      formError: formError || {},
      formValue: formDefaultValue

schema-typed

Schema for data modeling & validation

MIT
Latest version published 8 months ago

Package Health Score

61 / 100
Full package analysis

Popular schema-typed functions