How to use the @department-of-veterans-affairs/react-jsonschema-form/lib/utils.getUiOptions function in @department-of-veterans-affairs/react-jsonschema-form

To help you get started, we’ve selected a few @department-of-veterans-affairs/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 department-of-veterans-affairs / vets-website / src / js / common / schemaform / review / StringField.jsx View on Github external
export default function StringField(props) {
  const { registry, schema, uiSchema, formData } = props;
  const uiOptions = getUiOptions(uiSchema);
  const labels = uiOptions.labels || {};
  const enumOptions = Array.isArray(schema.enum) && optionsList(schema);

  let Widget = _.get('ui:reviewWidget', uiSchema);
  if (!Widget) {
    const defaultWidget = schema.format || (enumOptions ? 'select' : 'text');
    Widget = getWidget(schema, uiOptions.widget || defaultWidget, registry.widgets);
  }

  return (
    
  );
}