Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes 'plotly_relayout' warning from console (#601)
# Pull Request <!--- Replace `#nnn` with your issue link for reference. --> Fixes #600 ### Changes description - Only call `event_data` after histogram is plotted. How to test: - Run he app below and notice that there aren't any warnings. Both at start but on every addition of a range filter. Warning that is no longer visible ```r #> Listening on http://127.0.0.1:7089 #> Warning: The 'plotly_relayout' event tied a source ID of 'teal-main_ui-filter_panel-active-new_iris-filter-new_iris_Sepal_Length-inputs-histogram_plot' is not registered. In order to obtain this event data, please add `event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to obtain event data from. ``` App ```r pkgload::load_all(teal.slice) library(teal) options(teal.log_level = "INFO") app <- init( data = teal_data( new_iris = transform(iris, id = seq_len(nrow(iris))), new_mtcars = transform(mtcars, id = seq_len(nrow(mtcars))), code = " new_iris <- transform(iris, id = seq_len(nrow(iris))) new_mtcars <- transform(mtcars, id = seq_len(nrow(mtcars))) " ), modules = module( label = "data source", server = function(input, output, session, data) {}, ui = function(id, ...) tags$div(p("information about data source")), datanames = "all" ), filter = teal_slices( teal_slice(dataname = "new_iris", varname = "Sepal.Length") ), title = "App title", header = tags$h1("Sample App"), footer = tags$p("Copyright 2017 - 2023") ) |> shiny::runApp() ``` --------- Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
- Loading branch information