Biogen-Inc / IDEAFilter

An R Shiny Filtering module. Demo the shiny module at: https://bit.ly/demo_IDEAFilter
https://biogen-inc.github.io/IDEAFilter/
Other
11 stars 2 forks source link

Warning: Error in get_palette_color: could not find function "get_palette_color" #10

Open chrisumphlett opened 1 year ago

chrisumphlett commented 1 year ago

I'm trying to test this out in an existing, somewhat complex app I already have. It has a reactive data frame created with eventReactive(). I put a stripped-down version of the server code before with what I think are all of the relevant parts.

When I run the test code it works fine. When I adapt my app and inject the relevant pieces, I'm getting this warning/error I listed in the title. I cannot find a function of that name in any of the code for this package; and it's not a function I've created in my code.

Any ideas so I can proceed with troubleshooting? The app briefly loads but then closes and I see this error. It wouldn't seem to have anything to do (yet) with the reactivity and the action. This code shouldn't even run yet as far as I can tell.

Here's what I'm trying:

server <- function(input, output, session) {
    signal <- reactiveVal(rnorm(1))
    shinyjs::onclick("actionButton",
                   shinyjs::toggle(id = "greetbox-outer", anim = TRUE))
    data_input <- shiny::eventReactive(input$actionButton, {
        # A bunch of dplyr stuff
        return(final_data_frame)
    })

    filtered_data <- callModule(
        shiny_data_filter,
        "data_filter",
        data = data_input(),
        verbose = TRUE
    )

    output$tblLead <- renderReactable({
        lead <- filtered_data()

        reactable(lead, ##A bunch of reactable options##)

        output$lead <- renderUI({
            tagList(
                reactableOutput("tblLead"),
                if (input$actionButton == 0){
                    return()
                } else {
                    div(
                        style = "position: absolute; left: 24em; bottom: 0.5em;",
                        downloadButton(outputId = "dl2", label = "Download table"),
                    )
                }
            )
        })
    })
}