Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groups within groups take up space when they're hidden #2937

Open
SindreKjelsrud opened this issue Jan 22, 2025 · 0 comments
Open

Groups within groups take up space when they're hidden #2937

SindreKjelsrud opened this issue Jan 22, 2025 · 0 comments
Labels
kind/bug Something isn't working status/triage

Comments

@SindreKjelsrud
Copy link

SindreKjelsrud commented Jan 22, 2025

Description of the bug

I tried adding indented-groups within a panel-group in one of our forms. Below is a screenshot of the outcome, where you can see that the groups still take up space even when they're hidden.

Image

Steps To Reproduce

  1. In any form, create a new group using the panel-groupIndicator and fill it with some elements as below.
{
  "id": "gruppePlanlegging",
  "type": "Group",
  "children": [
    "skalPlanlegge",
    "nabolag",
    "skriftligVarsel",
    "opplegg"
  ],
  "groupingIndicator": "panel"
},
  1. Add a rule in RuleConfiguration.json to hide the elements when the panel-groups first element - which are RadioButtons - is selected as "No".

  2. Create some more groups, like 5, with the indented-groupIndicator containing some questions, as shown below.

{
  "id": "opplegg",
  "type": "RadioButtons",
  "textResourceBindings": {
    "title": "opplegg"
  },
  "dataModelBindings": {
    "simpleBinding": "model.opplegg"
  },
  "options": [
    {
      "label": "ja",
      "value": "Ja"
    },
    {
      "label": "nei",
      "value": "Nei"
    }
  ],
  "required": true
},
{
  "id": "gruppeOpplegg",
  "type": "Group",
  "children": [
    "oppleggKommentar"
  ],
  "groupingIndicator": "indented"
},
{
  "id": "oppleggKommentar",
  "type": "TextArea",
  "textResourceBindings": {
    "title": "oppleggKommentar"
  },
  "dataModelBindings": {
    "simpleBinding": "model.oppleggKommentar"
  },
  "required": true,
  "readOnly": false,
  "hidden": ["notEquals", ["component", "opplegg"], "Nei"]
},
  1. Add the indented groups into the panel-group.
{
  "id": "gruppePlanlegging",
  "type": "Group",
  "children": [
    "skalPlanlegge",
    "nabolag",
    "gruppeNabolag",
    "skriftligVarsel",
    "gruppeSkriftligVarsel",
    "opplegg",
    "gruppeOpplegg"
  ],
  "groupingIndicator": "panel"
},
  1. See the error when the panel-group is hidden.

Additional Information

No response

@SindreKjelsrud SindreKjelsrud added the kind/bug Something isn't working label Jan 22, 2025
@SindreKjelsrud SindreKjelsrud changed the title Groups wihin groups take up space when they're hidden Groups within groups take up space when they're hidden Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage
Projects
Status: No status
Development

No branches or pull requests

1 participant