Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to hide (close) the Modal without losing it's edited content? #98

Open
forna opened this issue Apr 16, 2023 · 2 comments
Labels
question Further information is requested

Comments

@forna
Copy link

forna commented Apr 16, 2023

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.

@flekschas flekschas added the question Further information is requested label Apr 16, 2023
@flekschas
Copy link
Owner

There are many ways to achieve this. The easiest is to store the form content with svelte stores.

@forna
Copy link
Author

forna commented Apr 17, 2023

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.

bandicam.2023-04-17.10-03-59-112.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants