Skip to content

Commit

Permalink
Merge pull request #12 from Boehringer-Ingelheim/rc/v3.0.1
Browse files Browse the repository at this point in the history
Rc/v3.0.1
  • Loading branch information
zsigmas authored Oct 8, 2024
2 parents 6dc8a5f + 2d19c0b commit 6da6da9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: dv.filter
Title: Dynamic Data Filtering Module
Version: 3.0.0
Version: 3.0.1
Authors@R: c(
person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
person("Ming", "Yang", email = "ming.yang.ext@boehringer-ingelheim.com", role = c("aut", "cre")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# dv.filter 3.0.1

- Fixes filter lack of reaction to dataset changes [#8](https://github.com/Boehringer-Ingelheim/dv.filter/issues/8)

# dv.filter 3.0.0

- GitHub release with QC report
Expand Down
13 changes: 12 additions & 1 deletion R/data_filter_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ data_filter_server <- function(id, data) {
},
ignoreInit = TRUE
)

# The first thing that should happen when the dataset changes is that returned becomes NULL
# Allows the caller to know that all filters have changed in a multifilter scenario
#
shiny::observeEvent(data(),
{
returned(NULL)
},
priority = 1
)

# Do not update the filter unless there has been any change in the returned vector
# The returned attribute maybe inconsistent, as filterings that return exactly the same
# logical vector may not update the expression attribute.
Expand All @@ -200,7 +211,7 @@ data_filter_server <- function(id, data) {
shiny::observeEvent(
selected(),
{
if (is.null(returned()) || !all(selected() == returned())) {
if (is.null(returned()) || !identical(selected(), returned())) {
returned(selected())
}
}
Expand Down

0 comments on commit 6da6da9

Please sign in to comment.