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

Fix url bookmarking with possibility to modify excludes #3762

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

galachad
Copy link

This small bug fix the problem that exclude was created before onSave call. It's impacting the url bookmarking and this change made it consistent with the server bookmarking.

Minimal example:

library(shiny)

ui <- function(req) {
  fluidPage(
    sliderInput("obs", "Number of observations:",
                min = 0, max = 1000, value = 500
    ),
    textInput("text", "Label", "Data Summary"),
    plotOutput("distPlot"),
    bookmarkButton()
  )
}

# Server logic
server <- function(input, output) {
  output$distPlot <- renderPlot({
    hist(rnorm(input$obs))
  })

  onBookmark(function(state) {
    # Exclude from bookmarking
    state$exclude <- c("text")
  })
}

shinyApp(ui, server, enableBookmarking = "url")
# shinyApp(ui, server, enableBookmarking = "server")

@galachad
Copy link
Author

galachad commented Feb 2, 2023

Hi @wch, could you take a look on PR as it fixing the issue with evaluating exclusion on url bookmarking.

@CLAassistant
Copy link

CLAassistant commented Nov 8, 2023

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

None yet

2 participants