-
Notifications
You must be signed in to change notification settings - Fork 628
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
Prevent multiple selectize/dynamic color brushes from being rendered in shiny #1936
Conversation
…ing rendered in shiny
e9a6898
to
74e1781
Compare
Hello, The new update did prevent multilple selectize/dynamic color from being rendered in shiny and it works for me but the select box is not accessible. I have attached an example. I can not type any entry. How to keep the selectize actif? Thanks library(shiny)
library(plotly)
library(ggplot2)
mtcars$brand = rownames(mtcars)
# Define UI
ui <- fluidPage(
# Application title
titlePanel("Testing highlight with shiny"),
#
sidebarLayout(
sidebarPanel(
selectInput("xid", "xcol", choices=colnames(mtcars), selected = "cyl"),
selectInput("yid", "ycol", choices=colnames(mtcars), selected = "mpg"),
),
# Show a plot of the generated distribution
mainPanel(
plotlyOutput("distPlot")
)
)
)
# Define server
server <- function(input, output) {
output$distPlot <- renderPlotly({
mtcars2 <- highlight_key(mtcars, ~brand, "Select brand")
gg <- ggplot(mtcars2, aes_string(x=input$xid, y=input$yid)) + geom_point()
## ggplotly(gg)
highlight(
suppressWarnings(ggplotly(gg)),
on = "plotly_click",
selectize = TRUE,
dynamic = TRUE,
persistent = FALSE
)
})
}
# Run the application
shinyApp(ui = ui, server = server) |
Thanks @cpsievert , I can now type an entry but there is still a small box (another non actif select) |
Follow up to plotly#1936: hash the selectize id so it can be used as an HTM…
Hi Carson, The latest committed version works fine for me. However if you subset or filter the original data the highlighted_key did not change/refresh. The list on the select box is still the original one. Here attached a reproducible example.
So how to change the list of brand names to the half as the data change to half? and refresh the list? Thanks, FE |
Closes #1584