How to use the react-jsonschema-form/lib/utils.isMultiSelect 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 Talend / ui / packages / forms / src / deprecated / fields / ArrayField.js View on Github external
render() {
		const { schema, uiSchema, idSchema, registry } = this.props;
		const { definitions } = registry;
		// eslint-disable-next-line no-prototype-builtins
		if (!schema.hasOwnProperty('items')) {
			return (
				
			);
		}
		if (isFixedItems(schema)) {
			return this.renderFixedArray();
		}
		if (isFilesArray(schema, uiSchema, definitions)) {
			return this.renderFiles();
		}
		if (isMultiSelect(schema, definitions)) {
			return this.renderMultiSelect();
		}
		return this.renderNormalArray();
	}
}
github cybertec-postgresql / rjsf-material-ui / src / ArrayFieldTemplate / ArrayFieldTemplate.tsx View on Github external
const ArrayFieldTemplate = (props: ArrayFieldTemplateProps) => {
  const { schema, registry = getDefaultRegistry() } = props;

  if (isMultiSelect(schema, registry.definitions)) {
    return ;
  } else {
    return ;
  }
};
github rjsf-team / react-jsonschema-form / packages / material-ui / src / ArrayFieldTemplate / ArrayFieldTemplate.tsx View on Github external
const ArrayFieldTemplate = (props: ArrayFieldTemplateProps) => {
  const { schema, registry = getDefaultRegistry() } = props;

  if (isMultiSelect(schema, registry.definitions)) {
    return ;
  } else {
    return ;
  }
};
github cloudwan / gohan_webui / src / Form / formComponents / fields / ArrayField / ArrayField.js View on Github external
render() {
    const {schema, uiSchema} = this.props;
    const widget = uiSchema['ui:widget'];

    if (widget === 'hidden') {
      return null;
    }

    if (isFilesArray(schema, uiSchema)) {
      return this.renderFiles();
    }
    if (isFixedItems(schema)) {
      return this.renderFixedArray();
    }
    if (isMultiSelect(schema)) {
      return this.renderMultiSelect();
    }
    if (schema.items.type === 'object') {
      return this.renderObjectArray();
    }
    return this.renderNormalArray();
  }
github RxNT / react-jsonschema-form-extras / src / Label.js View on Github external
export function DefaultLabel({
  schema,
  uiSchema,
  definitions,
  required,
  id,
  name,
  fields = {},
  formContext,
}) {
  const uiOptions = getUiOptions(uiSchema);
  let { label: displayLabel = true, forceLabelDisplay } = uiOptions;
  if (schema.type === "array") {
    displayLabel =
      isMultiSelect(schema, definitions) ||
      isFilesArray(schema, uiSchema, definitions);
  }
  if (schema.type === "object") {
    displayLabel = false;
  }
  if (schema.type === "boolean" && !uiSchema["ui:widget"]) {
    displayLabel = false;
  }

  const label = uiSchema["ui:title"] || schema.title || name;
  const description = uiSchema["ui:description"] || schema.description;

  const { DescriptionField = DefaultDescriptionField } = fields;

  if (displayLabel || forceLabelDisplay) {
    return [