Skip to content

Commit 842ba1b

Browse files
committed
fix add filter state
1 parent 947f151 commit 842ba1b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/module_brush_filter.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ srv_brush_filter <- function(id, brush, data, filter_panel_api, selectors, table
4343
}
4444
})
4545

46-
47-
4846
observeEvent(input$remove_brush_filter, {
4947
remove_filter_state(
5048
filter_panel_api,
@@ -68,10 +66,11 @@ srv_brush_filter <- function(id, brush, data, filter_panel_api, selectors, table
6866
))
6967
eval(filter_call)
7068

69+
# todo: when added another time then it is duplicated
7170
slice <- teal_slices(teal_slice(
7271
dataname = "ADSL",
7372
varname = "USUBJID",
74-
selected = merged_data$USUBJID,
73+
selected = unique(merged_data$USUBJID),
7574
id = "brush_filter"
7675
))
7776
set_filter_state(filter_panel_api, slice)

0 commit comments

Comments
 (0)