Skip to content

Commit

Permalink
2314: initialize selected groups
Browse files Browse the repository at this point in the history
  • Loading branch information
sinejespersen committed Oct 8, 2024
1 parent 9a7f08f commit 8c2f6d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/util/multi-and-table/select-groups-table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ function SelectGroupsTable({
);
}
setTotalItems(alreadySelectedGroups["hydra:totalItems"]);
setSelectedData([...selectedData, ...newGroups]);
const value = [...selectedData, ...newGroups];
setSelectedData(value);
handleChange({
target: { id: name, value: value.map((item) => item["@id"]) },
});
}
}, [alreadySelectedGroups]);

Expand Down

0 comments on commit 8c2f6d3

Please sign in to comment.