Skip to content

Commit c5c744d

Browse files
committed
remove unneeded
1 parent e0969da commit c5c744d

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

R/tm_data_table.R

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff 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
}

inst/swimlane_poc.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ pkgload::load_all("teal")
22
pkgload::load_all("teal.widgets")
33
pkgload::load_all("teal.modules.general")
44

5-
65
# Example data
76
data <- within(teal_data(), {
87
library(dplyr)

0 commit comments

Comments
 (0)