簡體   English   中英

在下拉菜單中未選擇任何內容時如何更改 R Shiny 占位符文本的顏色

[英]How to change color of R Shiny placeholder text when nothing is selected in dropdown

我一直在努力為我的 Shiny Leaflet Z1D78DC8ED51214E5018B511FE2 使用 CSS 現在我正在使用shinywidgets 的pickerinput 作為我的下拉菜單。 它們工作得很好,但是每當我單擊“取消全選”按鈕時,占位符文本就會變成灰色。 我希望顏色保持白色。 有誰知道如何解決這一問題? I meticulously combed through the css connected to my Shiny app, and changed all the colors that were grey to white, but nothing was connected to the deselect all function. 因此,我猜這是pickerinput的默認設置。 也許添加標簽可以改變下拉占位符文本的顏色? 我只是不知道那會是什么樣子。

在此處輸入圖像描述

在此處輸入圖像描述

這是此特定下拉菜單的代碼。

pickerInput("category", label= "Theme Areas",inline=FALSE,multiple = TRUE,  width= '100%',
                                           options = list(
                                                   `actions-box` = TRUE, 
                                                   size = 10,
                                                   `selected-text-format` = "count > 3",
                                                   `count-selected-text`= "{0} Selected",
                                                   `none-selected-text` = "None Selected"
                                           ),

在聯系 ShinyWidgets 團隊后,我通過添加以下簡單的代碼行解決了這個問題:

標簽$style(".bs-placeholder {color: #F2F2F2;important;}")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM