eclipsesource / eclipsesource/jsonforms

Objects are wrapped in double mat-cards

Open
#2,480 1 comment 0 reactions 0 assignees View on GitHub
angular material
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

### Describe the bug

Inner/nested objects are rendered with 2 mat-cards wrapping them.

### Expected behavior

Should only be wrapped in 1 card

### Steps to reproduce the issue

Create a schema with an inner object and render it without a custom ui schema, i.e.:

```
{
properties: {
Inner: {
$ref: '#/$defs/InnerModel',
},
// more properties
},
$defs: {
InnerModel: {
type: 'object',
properties: {
Name: {
type: 'string',
},
},
additionalProperties: false,
required: ['Name'],
},
},
}
```

Stackblitz: https://stackblitz.com/edit/stackblitz-starters-kwtfxnuc?file=src%2Fmain.ts

### Screenshots

_No response_

### Which Version of JSON Forms are you using?

v3.6.0

### Package

Angular Material Renderers

### Additional context

Likely happens due to the fallback in findUiSchema:

https://github.com/eclipsesource/jsonforms/blob/654278579857dee2dffef51545843c039111617b/packages/angular-material/src/library/other/object.renderer.ts#L84-L89

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.