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

[Bug]: Modules with generated datasets fail when tab is active #1306

Closed
3 tasks done
averissimo opened this issue Aug 9, 2024 · 4 comments
Closed
3 tasks done

[Bug]: Modules with generated datasets fail when tab is active #1306

averissimo opened this issue Aug 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working core

Comments

@averissimo
Copy link
Contributor

What happened?

options(
  teal.log_level = "TRACE",
  teal.show_js_log = TRUE,
  # teal.bs_theme = bslib::bs_theme(version = 5),
  shiny.bookmarkStore = "server"
)

pkgload::load_all("teal.data")
pkgload::load_all("teal.slice")
pkgload::load_all("teal")

my_transformers <- list(
  teal_transform_module(
    label = "Add ELO",
    ui = function(id) {
      ns <- NS(id)
      tagList(
        div("Some UI for transform (merge)"),
        actionButton(ns("btn"), "Reload data")
      )
    },
    server = function(id, data) {
      moduleServer(id, function(input, output, session) {
        eventReactive(input$btn, {
          data() |> within(mtcars <- datasets::mtcars)
        })
      })
    }
  )
)

teal::init(
  data = teal.data::teal_data(iris = iris),
  modules = list(
    example_module("mod-1", datanames = c("mtcars"), transformers = my_transformers),
    example_module("mod-2", datanames = c("iris"))
  )
) |>
  runApp()

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@gogonzo
Copy link
Contributor

gogonzo commented Aug 12, 2024

I think this is fixed with my latests commit

@gogonzo
Copy link
Contributor

gogonzo commented Aug 12, 2024

Closing as app doesn't fail anymore for such modules

@gogonzo gogonzo closed this as completed Aug 12, 2024
@gogonzo gogonzo self-assigned this Aug 12, 2024
@averissimo
Copy link
Contributor Author

averissimo commented Aug 12, 2024

@gogonzo the sample application is still failing for the module with mtcars in datanames

@averissimo averissimo reopened this Aug 12, 2024
@averissimo
Copy link
Contributor Author

averissimo commented Aug 12, 2024

Nevermind. My pull from teal.slice was incomplete. All good!

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

No branches or pull requests

2 participants