简体   繁体   English

Shiny中的文本输入-如何取消自动完成

[英]Textinput in Shiny - How to cancel autocomplete

I use textinput:我使用文本输入:

 textInput("password_input", label=h4(":pass"),value = "", width = "50%")

在此处输入图像描述

and I want to cancel the autocomplete that show me the last choices我想取消显示最后选择的自动完成

any suggetion?有什么建议吗?

If you can't use passwordInput we can use htmltools::tagQuery to set autocomplete = "off" :如果你不能使用passwordInput我们可以使用htmltools::tagQuery来设置autocomplete = "off"

library(shiny)
library(htmltools)

ui <- fluidPage(
  tagQuery(textInput("test", "test"))$find("input")$addAttrs("autocomplete" = "off")$allTags()
)

server <- function(input, output, session) {
  
}

shinyApp(ui, server)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM