Skip to content

Include the required files for virtualSelect tooltips #673

@stla

Description

@stla

Hello,

I've seen you upgraded virtual-select yesterday. This version allows to have tooltips for options displaying the text ellipsis, but in order to get these tooltips, there are two required files, namely tooltip.min.js and tooltip.min.css, that can be downloaded from here. Then the tooltips appear if one sets the option showValueAsTags=TRUE.

library(shiny)
library(shinyWidgets)

options <- c(
  "This is short text",
  "This is a longer text",
  "This is a very very very very long text",
  "This is a super ultra pro max very very very very long text"
)

ui <- fluidPage(
  tags$head(
    tags$scrip(src = "tooltip.min.js"),
    tags$link(rel = "stylesheet", href = "tooltip.min.css")
  ),
  titlePanel("Virtual Select Input Example"),

  virtualSelectInput(
    "selected_option", "Select Digital Thread:", choices = options,
    multiple = TRUE,
    showValueAsTags = TRUE),

  textOutput("selected_value")
)

server <- function(input, output, session) {
  output$selected_value <- renderText({
    paste("You selected:", input$selected_option)
  })
}

shinyApp(ui, server)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions