Skip to content

Commit

Permalink
fix: delete_rows() does not delete rows if the row selection is empty
Browse files Browse the repository at this point in the history
fix #608
  • Loading branch information
davidgohel committed Feb 22, 2024
1 parent c633aa3 commit 2ce0ecb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: flextable
Type: Package
Title: Functions for Tabular Reporting
Version: 0.9.5.009
Version: 0.9.5.010
Authors@R: c(
person("David", "Gohel", role = c("aut", "cre"),
email = "[email protected]"),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- `summarizor()` don't stop anymore if table only contain discrete columns.
- `as_flextable.data.frame()` supports 'data.table'
- `footnote()` handle undefined `ref_symbols` argument
- `delete_rows()` does not delete rows if the row selection is empty

## Changes

Expand Down
3 changes: 3 additions & 0 deletions R/augment_rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ delete_rows <- function(x, i = NULL, part = "body") {

check_formula_i_and_part(i, part)
i <- get_rows_id(x[[part]], i)
if (length(i) < 1) {
return(x)
}
x[[part]] <- delete_rows_from_part(x[[part]], i = i)
x
}
Expand Down

0 comments on commit 2ce0ecb

Please sign in to comment.