O
O
OlexAd2019-02-11 11:00:06
JavaScript
OlexAd, 2019-02-11 11:00:06

Leaflet js Popup is destroyed on hide, how to save changes to Popup?

When the popup is shown, changes are made inside, if the popup is hidden, then all the changes made to the content of the popup are lost, because the popup is destroyed.
How to keep changes in popup content even after hiding? The Update method recreates the popup, losing all changes.
getContent inside setContent didn't help, isn't it possible to save changes to the popup without storing them separately?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2019-02-11
@Austin_Powers

You can't do this without saving the content separately.
Store the content in cookie/localStorage if the data is used for a short time, or in the database if you need to work with it within different sessions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question