BUG: Removing items from view model list fails

Occasionally when clearing the items from a list, items will get stuck. The list size property will return 0 even when items are still present. This doesn’t happen consistently but I set up a demo:

https://codesandbox.io/p/devbox/blazing-sun-wwrx4l?workspaceId=ws_5b2SAT7ruxfRrn8zg71buE

Just click on the canvas to add and item. It should randomly clear out the items but occasionally one will get stuck and if you look at the size property of the list in the view model it returns 0 even though there are items visible. This tends to happen if you are clicking quickly. My guess is an item is being added while they are being cleared and it isn’t tracked.

This is the original post where I saw this issue in my game.

#Proper way to clear lists in View Model

And here’s a feature request to have a single clear function:
#List Clear Method