File tree Expand file tree Collapse file tree 2 files changed +1
-34
lines changed Expand file tree Collapse file tree 2 files changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -283,10 +283,7 @@ ui_data_table <- function(id,
283283
284284 tagList(
285285 teal.widgets :: get_dt_rows(ns(" data_table" ), ns(" dt_rows" )),
286- div(
287- actionButton(ns(" apply_brush_filter" ), " Apply filter" ),
288- actionButton(ns(" remove_brush_filter" ), " Remove applied filter" )
289- ),
286+ div(actionButton(ns(" apply_brush_filter" ), " Apply filter" )),
290287 fluidRow(
291288 teal.widgets :: optionalSelectInput(
292289 ns(" variables" ),
@@ -370,34 +367,5 @@ srv_data_table <- function(id,
370367 shinyjs :: hide(" apply_brush_filter" )
371368 set_filter_state(filter_panel_api , slice )
372369 })
373-
374- states_list <- reactive({
375- as.list(get_filter_state(filter_panel_api ))
376- })
377-
378- observeEvent(input $ remove_brush_filter , {
379- remove_filter_state(
380- filter_panel_api ,
381- teal_slices(
382- teal_slice(
383- dataname = " ADSL" ,
384- varname = " USUBJID" ,
385- id = " brush_filter"
386- )
387- )
388- )
389- })
390-
391- observeEvent(states_list(), {
392- brushed_states <- Filter(
393- function (state ) state $ id == " brush_filter" ,
394- states_list()
395- )
396- if (length(brushed_states )) {
397- shinyjs :: show(" remove_brush_filter" )
398- } else {
399- shinyjs :: hide(" remove_brush_filter" )
400- }
401- })
402370 })
403371}
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ pkgload::load_all("teal")
22pkgload :: load_all(" teal.widgets" )
33pkgload :: load_all(" teal.modules.general" )
44
5-
65# Example data
76data <- within(teal_data(), {
87 library(dplyr )
You can’t perform that action at this time.
0 commit comments