How to use the jsonforms-core.compose 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 / default / src / additional / tree-renderer.tsx View on Github external
private renderChildren(prop: ContainmentProperty,
                         parentPath: string,
                         parentSchema: JsonSchema) {

    const composedPath = compose(parentPath, prop.property);
    const data = resolveData(this.props.data, composedPath);
    const schema = prop.schema;
    const array = data;
    const key = prop.property;
    const parentProperties = JsonForms.schemaService.getContainmentProperties(parentSchema);

    for (const property of parentProperties) {
      // If available, additionally use schema id to identify the correct property
      if (!_.isEmpty(schema.id) && schema.id !== property.schema.id) {
        continue;
      }
      if (key === property.property) {
        return this.expandArray(array, property, composedPath);
      }
    }
    // TODO proper logging
github eclipsesource / jsonforms / packages / default / src / additional / tree-renderer.tsx View on Github external
return data.map((element, index) => {
      const composedPath = compose(path, index + '');

      return this.expandObject(
        composedPath,
        schema,
        path
      );
    });
  }
github eclipsesource / jsonforms / packages / default / src / additional / array-renderer.tsx View on Github external
data ? data.map((child, index) => {

                const generatedUi = generateDefaultUISchema(resolvedSchema, 'HorizontalLayout');
                const childPath = compose(path, index + '');

                return (
                  
                  
                );
              }) : <p>No data</p>
            }
github eclipsesource / jsonforms / packages / default / src / additional / tree-renderer.tsx View on Github external
return data.map((element, index) => {
      const composedPath = compose(path, index.toString());
      return this.expandObject(composedPath, property.schema, path);
    });
  }