SyncListStruct not syncing when client connects

I have setup a SyncListStruct class and using it in class deriving from NetworkBehaviour. When i add new items to it when both client and server are connected it syncs well.
But when i disconnect client and reconnect the list is empty. How can i make it so client can get it synced when he connects.

[System.Serializable]
public struct ItemClass
{
    public string name;
    public int amount;
    public int maxAmount;

    public ItemClass(string name, int amount)
    {
        this.name = name;
        this.amount = amount;
        this.maxAmount = 5;
    }
 }

`

public class SyncListItem : SyncListStruct<ItemClass>
{
}
public class NetworkedInventoryClass : NetworkBehaviour        
{
      public SyncListItem inventory = new SyncListItem(); 
}
public class test : NetworkBehaviour        // class on player
{
    public NetworkedInventoryClass inventory;

    [Command]
    public void CmdAddItem(string itemName, int itemAmount, int position)
    {
        inventory.inventory.Add(new ItemClass(itemName, itemAmount));
    }
}

`

Ok , i think i have solved my problem, so in case anyone else have problem:

The class deriving from SyncListStruct must be inside class where you want to use it, so in my case it’s

    public class NetworkedInventoryClass : NetworkBehaviour        
     {
           public SyncListItem inventory = new SyncListItem(); 
    
    
    public class SyncListItem : SyncListStruct<ItemClass>
     {
     }

 }

`

The struct itself can be in seperate file.
`