Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
14 stars 24 forks source link

Repeating groups with nested group not displaying name of row (variable name from datamodel) in summary. #2034

Open EirikOlavHaugenSSB opened 4 weeks ago

EirikOlavHaugenSSB commented 4 weeks ago

Description of the bug

In a repeating group containing an inner group of questions isn't able to pick up variables from the datamodel in a title. The screenshots show with red underlines which variables refer to the same place in the datamodel.

Steps To Reproduce

  1. Make a repeating group containing another group within
  2. Make the title of the inner group use a variable from the datamodel specific to the current row
  3. Make a summary page where you use the setting largeGroup and refer to the outer repeating group
  4. The title (inner group question title) won't be able to display the title, even though the subquestions within the inner group will.

Additional Information

image image image image

bjosttveit commented 3 weeks ago

Can you link the app where this is not working?

EirikOlavHaugenSSB commented 3 weeks ago

Can you link the app where this is not working?

https://altinn.studio/repos/ssb/ra0797-01

Latest commit should be available to check, but if i do changes in the repo later the commit ID is: 982c7bc573957dccbe16dc4e1e7f862e798e47a7

It's page 6: S06_InnlandTransportRegion.json and 7: S07_FreightFromInnlandTransport.json, and the summary page 20: S20_Summary.json. Page 6 and 7 are linked, and you will have to check some of the boxes in page 6 to get rows in page 7.

EirikOlavHaugenSSB commented 2 days ago

There's a workaround to this where instead of referring directly to the variable in the textresource files you instead refer to it in the component using "concat". Funnily enough I used this in other pages, but totally forgot about it when trying to fix the issue. Think the issue can still stand as I think it should work the initial way described, but thought I would post a workaround in case anyone else is wondering.

With fix: image image image