Facepunch / sbox-issues

175 stars 12 forks source link

[UI] Intro is always triggered on the latest element of a list #6768

Open bub-bl opened 6 days ago

bub-bl commented 6 days ago

Describe the bug

When you add a element in list within a panel, the intro is always triggered on the latest element of the list even you are adding an element at any index in of the list

To Reproduce

@foreach(var item in _items) { @item }

@code {

private readonly List<object> _items = new();

[Button("Add Item")]
private void Add(object item)
{
    _items.InsertAt(0, item);
}

}


- Add items when the game is running, the animation is always triggered on the last item of the list

### Expected behavior

The animation should be triggered on the new item, not on the last item of the list

### Media/Files

_No response_

### Additional context

_No response_
MrBrax commented 6 days ago

i think this would be related as a fix? #4103

bub-bl commented 6 days ago

i think this would be related as a fix? #4103

Yes, we need to up this kind of issues a little bit more, i get a lot of issue with all the ui stuff