Hi,
insertUI is very useful, but is not efficient with bookmark states. The typical use case is when I have an actionButton that creates an input field. When I execute the following example, click n times, and then bookmark, when I restore, the text fields are of course not restored.
But using a lapply is not straightforward: it will create 1 textInput at the first click, 2 more at the second, 3 more at the third, etc.
So we must use removeUI to remove the old copies:
There isn't a straightforward way to make bookmarking automatically work when you do things like insertUI. In your case you can use onRestored to insert the UI after the page has loaded.
Hi,
insertUI is very useful, but is not efficient with bookmark states. The typical use case is when I have an actionButton that creates an input field. When I execute the following example, click n times, and then bookmark, when I restore, the text fields are of course not restored.
I found a workaround, which is using lapply:
But using a lapply is not straightforward: it will create 1 textInput at the first click, 2 more at the second, 3 more at the third, etc.
So we must use removeUI to remove the old copies:
Therefore I have the feeling that insertUI could be optimised for bookmarking. What do you think?
The text was updated successfully, but these errors were encountered: