jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

[Angular] ListWithDetail is broken inside Category

Open Maxouwell opened this issue 10 months ago • 1 comments

Describe the bug

When putting a ListWithDetail in a second Category the rendenring is incorrect : image

Ui Schema :

  "type": "Categorization",
  "elements": [
    {
      "type": "Category",
      "label": "Cat1",
      "elements": [
        {
          "type": "HorizontalLayout",
          "elements": [
            {
              "type": "Control",
              "scope": "#/properties/bank/properties/name",
              "label": "Nom"
            }
          ]
        }
      ]
    },
    {
      "type": "Category",
      "label": "Cat2",
      "elements": [
        {
          "type": "ListWithDetail",
          "scope": "#/properties/visuals",
          "options": {
            "elementLabelProp": "visualId",
            "detail": {
              "type": "VerticalLayout",
              "elements": [
                {
                  "type": "Control",
                  "scope": "#/properties/visualId",
                  "label": "Identifiant du visuel"
                },
                {
                  "type": "Control",
                  "scope": "#/properties/file",
                  "label": "Fichier"
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

For comparizon, in the first category the rendering is correct : image

  "type": "Categorization",
  "elements": [
    {
      "type": "Category",
      "label": "Cat1",
      "elements": [
        {
          "type": "HorizontalLayout",
          "elements": [
            {
              "type": "Control",
              "scope": "#/properties/bank/properties/name",
              "label": "Nom"
            }
          ]
        }
      ]
    },
    {
      "type": "Category",
      "label": "Cat2",
      "elements": [
        {
          "type": "ListWithDetail",
          "scope": "#/properties/visuals",
          "options": {
            "elementLabelProp": "visualId",
            "detail": {
              "type": "VerticalLayout",
              "elements": [
                {
                  "type": "Control",
                  "scope": "#/properties/visualId",
                  "label": "Identifiant du visuel"
                },
                {
                  "type": "Control",
                  "scope": "#/properties/file",
                  "label": "Fichier"
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

Expected behavior

The rendering should be the same in any Category

Steps to reproduce the issue

Implements the first sample. the rendering will be incorrect

Screenshots

No response

In which browser are you experiencing the issue?

Version 116.0.5845.180

Which Version of JSON Forms are you using?

3.1.0

Framework

Angular

RendererSet

Material

Additional context

The test has been made in the last angular seed version, and discussed in this thread.

Maxouwell avatar Sep 12 '23 09:09 Maxouwell

Thanks for the report!

sdirix avatar Sep 15 '23 15:09 sdirix