Skip to content

Commit

Permalink
fix(dynamic table): row level format controls
Browse files Browse the repository at this point in the history
  • Loading branch information
nsenave committed Dec 26, 2024
1 parent 2726dc8 commit 3a1707c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ java {

allprojects {
group = "fr.insee.eno"
version = "3.31.3-SNAPSHOT"
version = "3.31.4-SNAPSHOT"
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ private void createFormatControlsForTable(Table table) {

private void createFormatControlsForRoster(RosterForLoop roster) {
List<ControlType> controls = getFormatControlsForBodyCells(roster.getComponents());

// The format controls of a roster for loop (dynamic table) are row-level controls
controls.forEach(control -> control.setType(ControlContextType.ROW));

roster.getControls().addAll(0, controls);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ void shouldRosterComponentsHaveSubComponentsControls() {
assertEquals(2, roster.getControls().size());
assertEquals("roster-id-number-format-borne-inf-sup", roster.getControls().get(0).getId());
assertEquals("roster-id-number-format-decimal", roster.getControls().get(1).getId());
roster.getControls().forEach(control -> assertEquals(ControlContextType.ROW, control.getType()));
}

private ResponseType buildResponse(String name) {
Expand Down

0 comments on commit 3a1707c

Please sign in to comment.