Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc/v3.0.1 #12

Merged
merged 7 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "[email protected]", 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
Loading