svelte-simple-modal
svelte-simple-modal copied to clipboard
Is it possible to hide (close) the Modal without losing it's edited content?
I have a Modal with some editable fields in it.
I would like to know if it's possible to keep the modal content, so basically just hide it when the Close button is clicked.
Currently when I close and reopen the Modal the editable fields content is lost.
I cannot simply save the Modal's form content because there are some <input type="file">
fields that cannot be instantiated again unless the user uploads the same files again.
Thank you.
There are many ways to achieve this. The easiest is to store the form content with svelte stores.
I have tested another svelte modal based on micromodal called "svelte-micromodal", with that it works out of the box. So I opt for that solution, thanks anyway.
https://user-images.githubusercontent.com/1431006/232429597-fe2d12c5-db07-46f6-91f3-6d72ab763dce.mp4