How to use the react-jsonschema-form/lib/utils.setState function in react-jsonschema-form

To help you get started, we’ve selected a few react-jsonschema-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 cloudwan / gohan_webui / src / Form / formComponents / widgets / FileWidget.js View on Github external
.then(filesInfo => {
        const state = {
          values: filesInfo.map(fileInfo => fileInfo.dataURL),
          filesInfo
        };
        setState(this, state, () => {
          if (multiple) {
            onChange(state.values);
          } else {
            onChange(state.values[0]);
          }
        });
      });
  };
github cloudwan / gohan_webui / src / Form / formComponents / fields / YamlField.js View on Github external
asyncSetState(state, options = {validate: false}) {
    setState(this, state, () => {
      this.props.onChange(this.state.value, options);
    });
  }
github cloudwan / gohan_webui / src / Form / formComponents / fields / ObjectField.js View on Github external
asyncSetState(state, options = {validate: false}) {
    setState(this, state, () => {
      this.props.onChange(this.state, options);
    });
  }
github cloudwan / gohan_webui / src / Form / formComponents / fields / ArrayField / ArrayField.js View on Github external
asyncSetState(state, options = {validate: false}) {
    setState(this, state, () => {
      this.props.onChange(this.state.items, options);
    });
  }