You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The default is for all inputs to be included in the bookmarking, except those specified in the default server.R's setBookmarkExclude(c(...)).
This becomes quite unwieldly as app become larger. In my case I forgot about the bookmarking and it worsened the performance of my app (due to mismatching inputs being remembered and causing an infinite error refresh loop). Also, it is effort to remember to update this list each time you add a new input.
Describe the solution you'd like
Introducing... setBookmarkInclude().
Clue in the name it basically does the opposite of setBookmarkExclude(). It does so my getting the list of all current inputs, then uses setdiff() to remove the inputs you want to add to the bookmark from the list of all inputs. Finally it passes this list of all other inputs to setBookmarkExclude().
I think this makes maintenance of the bookmarked inputs much easier and more explicit.
This could quite easily be turned into a function - setBookmarkInclude() (I think).
shiny::observe({
# Exclude all inputs except the specified ones dynamically
include_inputs <- c("input_include-1", "input_include-2", "input_include-3")
excluded_inputs <- setdiff(names(shiny::reactiveValuesToList(input)), include_inputs)
# Set the excluded inputs for bookmarking
shiny::setBookmarkExclude(excluded_inputs)
# Trigger bookmarking whenever relevant inputs change
session$doBookmark()
})
Describe alternatives you've considered
Haven't really...
Additional context
...
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The default is for all inputs to be included in the bookmarking, except those specified in the default
server.R
'ssetBookmarkExclude(c(...))
.This becomes quite unwieldly as app become larger. In my case I forgot about the bookmarking and it worsened the performance of my app (due to mismatching inputs being remembered and causing an infinite error refresh loop). Also, it is effort to remember to update this list each time you add a new input.
Describe the solution you'd like
Introducing...
setBookmarkInclude()
.Clue in the name it basically does the opposite of
setBookmarkExclude()
. It does so my getting the list of all current inputs, then usessetdiff()
to remove the inputs you want to add to the bookmark from the list of all inputs. Finally it passes this list of all other inputs tosetBookmarkExclude()
.I think this makes maintenance of the bookmarked inputs much easier and more explicit.
This could quite easily be turned into a function -
setBookmarkInclude()
(I think).Describe alternatives you've considered
Haven't really...
Additional context
...
The text was updated successfully, but these errors were encountered: