Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filterInputStyle option in reactiveTheme() does not work #186

Closed
jnhyeon opened this issue Aug 18, 2021 · 2 comments
Closed

filterInputStyle option in reactiveTheme() does not work #186

jnhyeon opened this issue Aug 18, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@jnhyeon
Copy link

jnhyeon commented Aug 18, 2021

Hello.
Thanks for making such a nice package.
I'm enjoying and using the packages you've created.

I found one problem while using it.
Among the many options of reactiveTheme(), the filterInputStyle option didn't work.

Below is the example code.

thank you.

--------------- example code -------------
library(shiny)
library(dplyr)
library(reactable)

data(iris)

dark_theme <- reactableTheme(
color = 'white',
backgroundColor = 'rgb(52, 58, 64)',
borderColor = 'rgb(69, 77, 85)',
stripedColor = 'rgb(69, 77, 85)',
highlightColor = 'rgb(69, 77, 85)',
inputStyle = list(backgroundColor = 'rgb(52, 58, 64)'),
filterInputStyle = list(color = 'white', # <- not working
backgroundColor = 'rgb(69, 77, 85)'),
selectStyle = list(backgroundColor = 'rgb(52, 58, 64)'),
pageButtonHoverStyle = list(backgroundColor = 'rgb(69, 77, 85)'),
pageButtonActiveStyle = list(backgroundColor = 'rgb(69, 77, 85)')
)

ui <- fluidPage(
checkboxInput('dark_mode', 'Dark mode', value = FALSE),
reactableOutput('table')
)

server <- function(input, output, session) {
output$table <- renderReactable({
if (input$dark_mode) {
iris %>%
reactable(filterable = TRUE,
theme = dark_theme)
} else {
iris %>%
reactable(filterable = TRUE)
}
})
}

shinyApp(ui, server)

image

@glin glin added the bug Something isn't working label Aug 22, 2021
@glin
Copy link
Owner

glin commented Aug 22, 2021

Thanks for the report! This was inadvertently fixed in the development version some time ago, but I didn't realize it. I've now added a NEWS item for this:

  • In reactableTheme(), filterInputStyle now applies correctly when rerendering a table in Shiny (#186).

@glin glin closed this as completed Aug 22, 2021
@jnhyeon
Copy link
Author

jnhyeon commented Aug 22, 2021

I confirmed that it worked fine after reinstalling from github.
Thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants