Fields of modal get emptied when modal is hidden

I’d like to prevent the fields of a modal to get emptied when that modal gets hidden.

The hide/show behavior uses the display property rather than conditional rendering, so I’d expect that the field values would remain.

Can someone explain why the values get reset, and how I can force the opposite behavior?

Hi @unlustucru :wave:

Indeed I would expect the values to remain when you’re using the CSS display property as opposed to conditional rendering.

I was able to reproduce this on my side (the input value persists when I close the modal but is reset when I reopen it):
CleanShot 2024-05-24 at 18.56.29

Let me check with the tech team if it’s a bug or expected.

1 Like

Hi @Joyce, were you able to check with your team?