Hi! I'm currently facing some issues about the ArraySchema.

To resume the situation, I have a Schema (team) which contain an ArraySchema (players). When a user click on a button he will join the team and he will be added to the ArraySchema mentionned above to become a player.

When the user left the application, I added a function to splice the ArraySchema mentionned above at the exact index of that player. To make sure that the player is correctly removed from the ArraySchema, I added a console.log in the onRemove callback.

Now, when a new user logging and click on the button to join the team, the player index should be the current amount of player. However, the index of the player is always increasing even if I remove multiple items from the ArraySchema. Am I missing something? Thanks :)

Here's a little snippet to showcase the structure:

0_1666725600869_Screenshot 2022-10-25 151945.png