Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
¿Cómo cambiar el color de algunas filas con rhansontable y checkbox?

Quiero cambiar el color de toda la fila cuando el usuario desmarca una casilla de verificación presente en una de las celdas. (Podrían ser varias filas)

Hasta ahora solo puedo cambiar el color de la celda que contiene la casilla de verificación en lugar de toda la fila. En este ejemplo, toda la fila 6 debe estar coloreada.

ingrese la descripción de la imagen aquí

 library(shiny) library(rhandsontable) # Define UI for application that draws a histogram ui <- fluidPage( rHandsontableOutput('table') ) # Define server logic required to draw a histogram server <- function(input, output) { df <- data.frame(alphabet = letters[1:10], include = TRUE) output$table <- rhandsontable::renderRHandsontable({ rhandsontable(df, height = 500) %>% hot_col(col = "include", renderer = " function (instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.CheckboxRenderer.apply(this, arguments); var col_value = instance.getData()[row][1] if (col_value === false) { td.style.background = 'pink'; } } ") }) } # Run the application shinyApp(ui = ui, server = server)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Resuelto.

 library(shiny) library(rhandsontable) # Define UI for application that draws a histogram ui <- fluidPage( rHandsontableOutput('table') ) # Define server logic required to draw a histogram server <- function(input, output) { df <- data.frame(alphabet = letters[1:10], include = TRUE) output$table <- rhandsontable::renderRHandsontable({ rhandsontable(df, height = 500) %>% hot_col(col = "include", renderer = " function (instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.CheckboxRenderer.apply(this, arguments); var col_value = instance.getData()[row][1] if (col_value === false) { td.style.background = 'pink'; } } ") %>% hot_col(col = "alphabet", renderer = " function (instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.TextRenderer.apply(this, arguments); var col_value = instance.getData()[row][1] if (col_value === false) { td.style.background = 'pink'; } } ") }) }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!