diff --git a/Content.Client/UserInterface/Controls/ListContainer.cs b/Content.Client/UserInterface/Controls/ListContainer.cs
index 53dddf110c..cf9ad681e5 100644
--- a/Content.Client/UserInterface/Controls/ListContainer.cs
+++ b/Content.Client/UserInterface/Controls/ListContainer.cs
@@ -28,7 +28,16 @@ public class ListContainer : Control
/// Called when creating a button on the UI.
/// The provided is the generated button that Controls should be parented to.
///
- public Action? GenerateItem;
+ public Action? GenerateItem
+ {
+ get => _generateItem;
+ set {
+ _generateItem = value;
+ // Invalidate _itemHeight so we recalculate the size of children the next
+ // time PopulateList() is called
+ _itemHeight = 0;
+ }
+ }
///
public Action? ItemPressed;
@@ -59,6 +68,7 @@ public class ListContainer : Control
private bool _updateChildren = false;
private bool _suppressScrollValueChanged;
private ButtonGroup? _buttonGroup;
+ public Action? _generateItem;
public int ScrollSpeedY { get; set; } = 50;