# use non-exported function from teal.slice
include_js_files <- getFromNamespace("include_js_files", "teal.slice")
EmptyFilterState <- getFromNamespace("EmptyFilterState", "teal.slice")
library(shiny)
filter_state <- EmptyFilterState$new(
x = NA,
slice = teal_slice(varname = "x", dataname = "data"),
extract_type = character(0)
)
isolate(filter_state$get_call())
filter_state$set_state(teal_slice(dataname = "data", varname = "x", keep_na = TRUE))
isolate(filter_state$get_call())
Run the code above in your browser using DataLab