SelectizeGroupUI - 部署 AWS 时无法设置筛选器宽度、INLINE = TRUE 错误

2023-12-28

在我闪亮的应用程序中,我使用 selectizeGroupUI 作为我的依赖选择输入的一部分。我正在努力手动将过滤器的宽度设置为比标题更宽。请参阅下面的屏幕截图。强烈赞赏建议。

UI 渲染的屏幕截图,过滤器宽度默认为标题长度 https://i.stack.imgur.com/WZlqX.png

第二个问题是,当部署在 AWS ubuntu 上时,INLINE = TRUE 并不适用于所有 selecinput。请参阅下面的屏幕截图。 Ubuntu正在运行shinyWidgets 0.6.3,shiny 1.7.1。

已部署应用程序的屏幕截图,其中一个过滤器在 INLINE = TRUE 时错误地显示为水平 https://i.stack.imgur.com/X95FM.png

OYCF_PDE_Entities <- dbGetQuery(con,
                     "SELECT * FROM oycf_pde_entities")
geocodes_penn_counties <- dbGetQuery(con,
                                     "SELECT * FROM geocodes_penn_counties")

#Define the UI
ui <- fluidPage(
  tags$head(
    tags$style(HTML("hr {border-top: 1px solid #1D5C91;}"))
  ),
  theme = bs_theme(version = 5, bootswatch = "materia"),
  titlePanel(img(src = "PDE.jpg",height=150, width= 150)),
  
  sidebarLayout(
    sidebarPanel(
      h4(strong("Query the PDE/OCYF Database")),
      h5(strong("Purpose")),
      p("This application is designed for performing custom queries to a database containing information about private and non-public 
      entities who are serving school-aged children and youth in the Commonwealth of Pennsylvania. Sites in this database include private or non-public licensed schools, as well 
        as non-public entities such as residential and juvenile justice institutions."),
      p(strong("How to Search")),
      tags$ol(
        tags$li("The database provides information at the site-level, as well as by several higher-order aggregates, including region, county, city, type of service, PDE Educational Entity and DHS Entity."),
        tags$li("Use the drop-down filters within this menu to perform a custom query that automatically displays in the table. Selecting one or more values fromm the filters will automatically remove irrelevant values from the rest of the filters. You can also use the filters in any order. They will still show only relevant options."),
        tags$li("The search function at the top right of the table accepts words and/or whole numbers. The search function looks across all columns for all entities in the database and displays every entity with a column containing the number and/or word that was typed."),
        tags$li("Use the first drop down box to select multiple fields from the database. Your choices will be displayed automatically in the table. The application defaults to showing several key fields. Use backspace")
        ),
      selectInput(
        "vars",
        strong("Select Fields"),
        names(OYCF_PDE_Entities),
        selected = c("DHS_ENTITY_NAME","CITY","COUNTY","REGION","ADMINISTRATIVE_UNIT_AUN"),
        selectize = TRUE,
        multiple=TRUE),
      selectizeGroupUI( 
        id="my_filters",
        inline= TRUE,
        params = list(
          REGION = list(inputId="REGION",title="Select Region",placeholder='select'), 
          COUNTY = list(inputId="COUNTY",title="Select County",placeholder='select'),
          CITY = list(inputId="CITY",title="Select City",placeholder='select'),
          DHS_TYPE_OF_SERVICE = list(inputId="DHS_TYPE_OF_SERVICE",title="Select Type of Service",placeholder='select'),
          PDE_EDUCATIONAL_ENTITY = list(inputId="PDE_EDUCATIONAL_ENTITY",title="Select PDE Educational Entity",placeholder='select'),
          DHS_ENTITY_NAME = list(inputId="DHS_ENTITY_NAME",title="Select DHS Entity",placeholder='select')
          ),
        btn_label="Reset All Filters"
        ),
      p("For technical support, please contact [email protected] /cdn-cgi/l/email-protection",
        style = "font-family:'arial';font-size:11pt;color:#1D5C91",align = "center")
    ),
    mainPanel(
      tabsetPanel(
        tabPanel("Database",
                 br(),
                 DT::dataTableOutput("MainTable")),
        tabPanel("Map of Entities in Database",
                 br(),
                 plotOutput("entitymap", height="900px",width="1000px")
                 )

    ))
  )
)

server <- function(input,output,session){
#create reactive environment for database
  rv <- reactiveValues(alldata=data.frame(OYCF_PDE_Entities))
  
#set up the table's server module
DHSTable <- callModule(
  module = selectizeGroupServer,
  id = "my_filters",
  data = rv$alldata,
  vars = c("REGION","COUNTY","CITY","DHS_TYPE_OF_SERVICE","PDE_EDUCATIONAL_ENTITY","DHS_ENTITY_NAME")
)

#output the filtered data to data table UI
  output$MainTable <- DT::renderDataTable({
    DHSTable() %>% select(all_of(input$vars))
  })

#output map of entities across the state of PA
  
output$entitymap <- renderPlot({
  ggplot() +
    geom_polygon(
      mapping = aes(lon,lat,group = group),
      data = geocodes_penn_counties,
      fill="#1D5C91",colour = "deepskyblue3") +
    geom_point(data = DHSTable(), mapping = aes(x = lon, y = lat),colour ="cyan1",size = 1.5) +
    theme_bw() + 
    theme(panel.border = element_blank(), 
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          axis.line = element_blank(),
          axis.ticks = element_blank(),
          axis.title = element_blank(),
          axis.text = element_blank()) +
    coord_quickmap()
  })
  
#Query Results - When filters are changed, update the count from the table even if looking at the map (table not loaded)
  
#reactive expression
  records_reactive <- eventReactive(
    input$MainTable_rows_all,{
      NROW(input$MainTable_rows_all)
    }
  )

  #output record count
  output$recordsreturned <- renderText(paste("Number of Records:",records_reactive()))
  
#summary, not filter dependent
output$descriptive1 <- renderText(paste("Total Number of Records in Database:",nrow(OYCF_PDE_Entities)))

}

#Run the app
shinyApp(ui = ui,server = server)

我想我知道问题是什么。从shinyWidgets版本0.6.3开始,您需要重复inline论据中的callModule-call.

需要进行此更改的原因是这个问题 https://github.com/dreamRs/shinyWidgets/issues/419.

请参阅我在以下示例的服务器部分中的评论:

library(shiny)
library(shinyWidgets)

data("mpg", package = "ggplot2")

ui <- fluidPage(
  titlePanel("Hello Shiny!"),
  sidebarLayout(
    sidebarPanel(
      selectizeGroupUI(
        id = "my-filters",
        params = list(
          manufacturer = list(inputId = "manufacturer", title = "Manufacturer:"),
          model = list(inputId = "model", title = "Model:"),
          trans = list(inputId = "trans", title = "Trans:"),
          class = list(inputId = "class", title = "Class:")
        ),
        inline = FALSE
      )
    ),
    mainPanel(
      DT::dataTableOutput(outputId = "table")
    )
  )
)

server <- function(input, output) {
  res_mod <- callModule(
    module = selectizeGroupServer,
    id = "my-filters",
    data = mpg,
    vars = c("manufacturer", "model", "trans", "class"),
    inline = FALSE # switch to TRUE to see the issue
  )
  output$table <- DT::renderDataTable(res_mod())
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

SelectizeGroupUI - 部署 AWS 时无法设置筛选器宽度、INLINE = TRUE 错误 的相关文章

  • 如何在 GNU/Linux 上设置 Subversion (SVN) 服务器 - Ubuntu [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我有一台运行 Ubuntu 的笔记本电脑 我想将其用作 Subversion 服务器 既让我自己在本地承诺 也让其他人远程承诺 要使其
  • 闪亮的仪表板侧边栏中的可折叠菜单项

    我的侧边栏中有两个菜单项 目前 如果我单击任何菜单项 则会显示所有菜单项的选项卡项 我想让它可折叠 如果我单击多个名称菜单 单个分析应该折叠 如果我单击单个分析 多个分析应该折叠 目前的设计是 相同的可重现代码是 library shiny
  • 简单的openGL程序无法在ubuntu中链接

    我正在尝试进入 opengl 编程 但无法编译我的第一个非常非常简单的程序 链接过程每次都会失败 我发现这个答案 https stackoverflow com questions 859501 learning opengl in ubu
  • 使用Shiny和Shinydashboard时如何使图标大小一致?

    我在闪亮的应用程序中添加可点击的图标以显示弹出信息框 请参阅以下屏幕截图和代码示例 我的策略是将我的文本和代码包装起来actionLink in the HTML功能 这效果很好 然而 图标的大小是由关联的大小决定的 我想知道是否可以使所有
  • 如何从闪亮模块调用闪亮模块?

    如何从闪亮模块中调用闪亮模块并传递第一个模块中的选择 作为一个例子 我编写了一个应用程序来显示星球大战主题dplyr在 DT data 表中 模块StarWars 来自同一数据集的相关电影应显示在另一个子选项卡 模块电影 的另一个 DT d
  • HTML DOM 宽度 + 可见窗口高度

    如何获取浏览器打开时可用空间的当前高度和宽度 我不需要整个文档的高度 只需要屏幕上可见的高度 你可以看看这个博客文章 http www howtocreate co uk tutorials javascript browserwindow
  • 添加带有错误的弹出窗口,警告闪亮

    有什么办法可以添加一个popup 可关闭的窗口 其中包含警告或其他消息Shiny 我用来构建 Web 应用程序的 R 包 我已经寻找了一段时间但没有任何结果 虽然我不认为有任何本地可用的东西shiny 你可以尝试添加jQueryUI到您的应
  • dpkg 错误:pycompile:未找到

    sudo apt get remove purge mysql server mysql client mysql common 当我尝试使用上述命令删除 mysql 时 出现以下错误 Reading package lists Done
  • Shiny 中的模态对话框:可以调整宽度但不能调整高度

    在我的 Shiny 应用程序中 我有几个来自闪亮BS 包的模式窗口 我可以像这样调整这些模式窗口的宽度 tags head tags style HTML modal lg width 1200px abs 1 background col
  • Ubuntu 16.04/Django - Gunicorn - Worker 无法启动

    我正在 Digital Ocean Ubuntu 16 04 VPS 上部署 Django 项目 我使用的是Django的一键安装 然后替换为我的项目 问题是服务器返回502 Error EDIT 没有realestate scanner
  • 请检查 PPA 名称或格式是否正确

    在我的 Ubuntu 14 04 中 我尝试安装 Captiva 图标包 如上所列这个 omgubuntu 帖子 http www omgubuntu co uk 2014 09 4 gorgeous linux icon themes d
  • 静态 OpenCV 库中未定义的引用

    我有一个使用 OpenCV 3 1 的 C 项目 并且使用共享库可以正常工作 但现在我想使用静态库 位于项目目录中的文件夹中 来编译它 因为我希望能够在未安装 OpenCV 的情况下导出它 如果需要还可以编辑和重新编译 这次我重新编译了 O
  • 在 R Shiny 中显示/隐藏整个框元素

    我目前正在尝试找到一种方法来隐藏 显示 R Shiny 中的整个 box 元素 以及里面的所有内容 我想创建一个可能的按钮 它允许用户展开特定框 然后使用相同 甚至不同 的按钮隐藏它 我不想使用条件面板 因为我的应用程序非常大并且会产生一些
  • R:如何更改ggvis闪亮应用程序中特定范围的绘图背景颜色

    I have a simple shiny app like below and you can run it The plots are created by ggvis and user can choose student name
  • Eclipse Kepler 在 64 位 ubuntu 上冻结

    几天前我刚刚将 Ubuntu 升级到 14 04 并在此过程中从 32 位切换到 64 位 从那时起 Eclipse 就变得非常不稳定 运行几分钟后 它将开始随机冻结越来越长的时间 特别是在代码完成时 已经必须禁用它 而且在剪切 粘贴时 偶
  • 在openCV内部调用Gstreamer

    我需要在 openCV 代码中调用 Gstremaer 本质上是打开摄像机 当我查看源代码时 modules highgui src cap gstreamer cpp似乎是我正在寻找的文件 我用 Gstreamer 标志编译了 OpenC
  • 是否有 Ubuntu 10.04 存储库可以下载最新版本的 Eclipse?

    我还没有找到一个可以安装 Eclipse 4 2 Juno 的软件 默认的 Ubuntu 存储库 我使用的是 Ubuntu 10 04 建议我使用古老的 Galileo 版本 我在 Launchpad 上找到了 Eclipse 的页面 该页
  • 更新两组单选按钮 - 闪亮

    我问了这个问题 反应式更新两组单选按钮 闪亮 https stackoverflow com questions 35040579 update two sets of radiobuttons reactively shiny 昨天 但也
  • 有没有办法在 TypeScript 2+ 中全局添加类型定义?

    我有一堆简单的 ts files 不是项目 即独立的 ts 脚本 他们使用一些 Node js 功能 TypeScript 和节点类型定义通过安装 npm install g typescript npm install g types n
  • 如何将 Shiny 中生成的反应图传递到 Rmarkdown 以生成动态报告

    简而言之 我希望能够通过单击按钮从我的闪亮应用程序生成动态 Rmarkdown 报告文件 pdf 或 html 为此 我想我将使用 Shiny 的参数化报告 但不知何故 我无法将单个谜题转移到所需的目标 使用此代码 我们可以在 R Shin

随机推荐

  • 什么时候需要@property和@synthesize?

    我到底什么时候需要添加 property nonatomic retain and synthesize 另外 什么时候声明IBOutlet someObject足够的 我如何在没有 property 和 synthesize 的情况下设置
  • 如何确定字符串是否包含无效编码字符

    使用场景 我们已经实现了一个 Web 服务 我们的 Web 前端开发人员在内部使用 通过 php api 来显示产品数据 用户在网站上输入一些内容 即查询字符串 在内部 网站通过 api 调用该服务 注意 我们使用restlet 而不是to
  • Gulp 失败并显示消息:需要对象

    我正在尝试在 w7 上使用 gulp gruntjs 工作 节点工作 如果我在没有 gulp 文件的情况下启动 gulp 它运行良好 说 没有找到 gulpfile gulp v 给出 cli 版本 3 5 6 本地版本 3 5 6 使用以
  • 将 /EHa 添加到使用 Microsoft Visual C++ 编译器的 QtCreator

    我怎样才能添加 EHaMS 编译器 QtCreator 中的 结构化异常处理 我一直使用 Microsoft Visual C 编译器 这是如何做到的 适用于 Qt 4 和 Qt 5 这将设置 EHa 而不是默认的 EHsc win QMA
  • 寻找正则表达式扩展[关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我正在寻找一个可以在我们的应用程序中使用的正则表达式库 该库是用 PowerBuilder 编写的 P
  • DIV 内有两个 DIV。如何用第二个DIV自动填充父DIV的空间?

    请拜访这把小提琴 http jsfiddle net nirmand HQwLG 明白我的意思 我有一个父 DIV 其中有两个按垂直顺序放置的 DIV 顶部 DIV 应仅具有其内容的高度 而底部 DIV 应占据父 DIV 的所有剩余空间 无
  • 从 ASP.NET Web 服务接收 DTO

    如果我运行 ASP NET 并且正在访问一个返回 Person 对象列表的外国 asmx Web 服务 其中 Person 是外国公司定义的某个 DTO 那么我处理结果的最佳方法是什么 我是否应该创建自己的名为 Person 的 DTO 对
  • 从命令行获取用户的未截断的 Active Directory 组

    我经常使用net user命令查看用户的 AD 组 net user DOMAIN
  • MVC:如何为视图模型提供一个列表并在 .cshtml 上正确输出它

    我所做的是以给定值作为名称来搜索 Activedirectory 用户 然后 我创建一个包含名称 电子邮件和描述值的视图模型 然后我在索引上将其显示为 cshtml 问题在于我的制作方式 它只发送它找到的第一个用户 如果我从多个安德鲁中搜索
  • Pandas:删除所有 NaN 的列

    我有这个数据框 0 1 2 3 4 5 6 7 0 0915 8 NaN NaN NaN NaN NaN NaN NaN 1 NaN NaN NaN LIVE WGT NaN AMOUNT NaN TOTAL 2 GBW COD NaN N
  • 如何将 Eigen 库添加到 C++ 项目中

    可能是一个愚蠢 简单的问题 但我一直无法找到答案 我不知道如何使用 CodeBlocks c 添加库 我从以下位置下载了 zip 文件http eigen tuxfamily org index php title Main Page ht
  • 使用 ReactiveSecurityContextHolder 手动设置身份验证

    我正在尝试使用 Spring Web Flux 设置 Spring Security 不明白如何手动设置SecurityContext with ReactiveSecurityContextHolder 您有任何资源或提示吗 以我编写的这
  • Git Filter-Branch All 命令

    目前 我正在使用命令 git filter branch subdirectory filter MY DIRECTORY all 从该 git 存储库的所有 30 个分支中获取某个目录 在执行此过滤分支命令之前 我确保检查每个分支以确保
  • 如何更改 SpriteComponent 的颜色?

    我有一个查询系统 可以找到鼠标悬停在其中的对象 这不是一个按钮 但是 我想改变颜色 我不知道从哪里开始 我要查询什么属性以及如何更改它 目前 我有以下内容 fn mouse move mut commands Commands cursor
  • ContextBroker 订阅错误

    我已按照本教程安装 NGSI 将 cygnus 从版本 0 13 更新到 1 7 0 https github com telefonicaid fiware cygnus tree master cygnus ngsi https git
  • 在 python 中将 numpy、list 或 float 转换为字符串

    我正在编写一个 python 函数来将数据附加到文本文件 如下所示 问题是变量 var 可以是一维numpy数组 一维列表 或者只是一个浮点数 我知道如何转换numpy array list float单独字符串 意味着给定类型 但是有没有
  • UIAlertController 代码上的 EXC_BAD_ACCESS = 1

    我有一个视图控制器 我从其中启动UIAlertController单击按钮 下面是我的代码 IBAction playOnlineURL UIButton sender self launchPlayURLAlert void launch
  • 使用 Docker 运行单个 NodeJS 脚本并能够使用 Ctrl-C 终止它的最简单方法是什么

    从 Docker 的文档来看 如果你想运行独立的 NodeJS 脚本 你应该使用以下命令 docker run it rm name my running script v PWD usr src app w usr src app nod
  • OS X Lion 中显示“非法指令:4”

    一些 C 应用程序在 OS X Snow Leopard 中编译并无缝运行 但我最近更改为 OS X Lion 在这里 虽然没有编译错误 但当我尝试运行它时 我收到错误 非法指令 4 我没有任何线索 可能是什么原因 PS 这些是我使用的链接
  • SelectizeGroupUI - 部署 AWS 时无法设置筛选器宽度、INLINE = TRUE 错误

    在我闪亮的应用程序中 我使用 selectizeGroupUI 作为我的依赖选择输入的一部分 我正在努力手动将过滤器的宽度设置为比标题更宽 请参阅下面的屏幕截图 强烈赞赏建议 UI 渲染的屏幕截图 过滤器宽度默认为标题长度 https i