Divs not updating after a Razor Panel update
Describe the bug
I have a List of integers and a function that returns a string based on the integer index passed to it. The resulting strings display in the divs correctly, and new numbers can be placed in the list, but if the list is cleared and the Panel is updated, the old strings remain in the divs.
I tried to recreate this bug in a new project, but the bug didn't happen, so I took the game I'm working on and stripped it down to a small amount of code that still recreates the bug. I can't see a functional difference between the two, but maybe I'm misunderstanding something.
To Reproduce
Below is a project that reproduces the bug. As stated above, recreating this project and sending the numbers to the divs in a more simple way did not reproduce the bug. This may be user error
Calling StateHasChanged() in the Reset function does not fix this behavior
Expected behavior
In the Repro Project as well as the demonstration video below, when the "Play Again" button is pressed, the divs with 1s in them should be cleared. A Log.Info in the Reset function shows that the Guesses List is cleared successfully, but the divs do not update.
Media/Files
https://github.com/user-attachments/assets/1d5e8bb4-1c14-4949-80e3-e69497398807
Additional context
No response
i'm having the same issue except the text is jumping around, same setup with looping through items with divs
https://github.com/user-attachments/assets/ebd6e502-48cb-45dc-98f6-547101f425cb
i feel like it could be related to #4103
@justinlua314 Fixed the issue on your (very handy!) repro project, if you want to give it a test on your main project and let me know if that's sorted? Mindful there might be more than one thing causing similar behaviour.
@MrBrax I don't think that video's related to this issue here, if it's definitely not just funky positioning in your css, could you get it entered as a separate issue and we'll have a look. A small repro project would be very helpful!
Cheers both 🫡
@solwllms it's not positioning related, it happens when the html structure is the same but the values for them change. i'll try and see if i can make a repro
@solwllms That seems to have fixed the issue. Much appreciated!