shinydashboard and matrixInput

I'm trying to get a matrixInput from the package shinyMatrix working on the sidebar of my shinydashboard application, as shown below. As you can see, whenever you click on one of the matrix entries, the white text is hidden by the highlight color and the white text on the white highlight makes it impossible to see what you are doing. I've been unable to figure out the CSS magic words to change the highlighting for that component only so that each matrix element edits the same way a a standard text input does, but I know they must exist. Any ideas?
Thank you.

library(shiny)
library(shinydashboard)
library(shinyMatrix)

mat <- matrix(rep("Hide!",9), 3, 3)


ui <- dashboardPage(
    dashboardHeader(),
    dashboardSidebar(
        textInput("tInput","Text",value = "Good!"),
        shinyMatrix::matrixInput(
            "mInput",
            value = mat,
            class = 'character'
        )
    ),
    dashboardBody()
)


server <- function(input, output) {

   
}

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

Created on 2020-11-14 by the reprex package (v0.3.0)

My tip is to use the inspector developor tools to look at the html/css markup of the items you want to change. You change change the values in the inspector in realtime to see the effect, then go back to your code and write it in.

library(shiny)
library(shinydashboard)
library(shinyMatrix)

mat <- matrix(rep("Hide!", 9), 3, 3)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    textInput("tInput", "Text", value = "Good!"),
    shinyMatrix::matrixInput(
      "mInput",
      value = mat,
      class = "character"
    )
  ),
  dashboardBody(
    tags$head(tags$style(HTML(
    ".matrix-input-cell{color: coral;}"
  ))))
)

server <- function(input, output) {
}

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.