How to use the jsonforms-core.resolveSchema function in jsonforms-core

To help you get started, we’ve selected a few jsonforms-core 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 eclipsesource / jsonforms / packages / materialized / src / controls / materialized.enum.control.tsx View on Github external
render() {
    const {
      uischema,
      schema,
      classNames,
      id,
      label,
      visible,
      enabled,
      data,
      errors
    } = this.props;
    const options = resolveSchema(
      schema,
      (uischema as ControlElement).scope.$ref
    ).enum;

    return (
      <div hidden="{!visible}">
        <select value="{this.state.value" disabled="{!enabled}"> this.handleChange(ev.target.value) }
        &gt;
          {
            [<option value="">]
              .concat(
                options.map(optionValue =&gt; {</option></select></div>
github eclipsesource / jsonforms / packages / default / src / additional / tree-renderer.tsx View on Github external
const mapStateToProps = (state, ownProps) => {
  const path = compose(ownProps.path, toDataPathSegments(ownProps.uischema.scope.$ref).join('.'));
  const visible = _.has(ownProps, 'visible') ? ownProps.visible :  isVisible(ownProps, state);
  const enabled = _.has(ownProps, 'enabled') ? ownProps.enabled :  isEnabled(ownProps, state);

  return {
    rootData: getData(state),
    data: resolveData(getData(state), path),
    uischema: ownProps.uischema,
    schema: ownProps.schema,
    resolvedSchema: resolveSchema(ownProps.schema, ownProps.uischema.scope.$ref),
    path,
    visible,
    enabled
  };
};
github eclipsesource / jsonforms / packages / default / src / additional / array-renderer.tsx View on Github external
({  schema, uischema, data, path, dispatch }: ControlProps) =&gt; {

    const controlElement = uischema as ControlElement;
    const label = getLabelObject(controlElement);
    const resolvedSchema = resolveSchema(schema, controlElement.scope.$ref + '/items');
    const className = `control ${(convertToClassName(controlElement.scope.$ref))}`;

    return (
      <div>
        <fieldset>
          <legend>
            <button> addNewItem(dispatch, path)}
            &gt;
              +
            </button>
            <label>
              { label.show ? label.text : '' }
            </label></legend></fieldset></div>