How to use the @jsonforms/core.createDefaultValue 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 / material / src / layouts / MaterialArrayLayout.tsx View on Github external
  innerCreateDefaultValue = () => createDefaultValue(this.props.schema);
  handleChange = (panel: string) => (_event: any, expanded: boolean) => {
github eclipsesource / jsonforms / packages / vanilla / src / complex / TableArrayControl.tsx View on Github external
type: 'Control',
      label: false,
      scope: schema.type === 'object' ? `#/properties/${key}` : '#'
    });
    const labelObject = createLabelDescriptionFrom(controlElement, schema);
    const isValid = errors.length === 0;
    const divClassNames = 'validation' + (isValid ? '' : ' validation_error');
    const labelText = isPlainLabel(label) ? label : label.default;

    return (
      <div hidden="{!visible}">
        <header>
          <label>{labelText}</label>
          <button>
            Add to {labelObject.text}
          </button>
        </header>
        <div>
          {!isValid ? errors : ''}
        </div>
        
              {schema.properties ? (
                fpflow(
                  fpkeys,
                  fpfilter(prop =&gt; schema.properties[prop].type !== 'array'),
                  fpmap(prop =&gt; )
                )(schema.properties)<table>
          <thead>
            <tr><th>{fpstartCase(prop)}</th></tr></thead></table></div>
github eclipsesource / jsonforms / packages / material / src / complex / MaterialOneOfRenderer.tsx View on Github external
const openNewTab = (newIndex: number) => {
      handleChange(
        path,
        createDefaultValue(schema.oneOf[newIndex])
      );
      setSelectedIndex(newIndex);
    }
github eclipsesource / jsonforms / packages / angular-material / src / other / master-detail / master.ts View on Github external
onAddClick() {
    this.addItem(this.propsPath, createDefaultValue(this.scopedSchema))();
  }