If you call data_edit() inside another function and set viewer = "dialog", the parental function exits early when the data editor is closed. See example:
fun <- function() {
mtcras_new <- data_edit(mtcars)
for(i in 1:30){
print(i)
}
return(mtcars_new)
}
fun()
This issue has been reported (https://github.com/rstudio/shiny/issues/1723) but it looks like the only solution is to switch to using viewer = "browser" or viewer = "pane" in data_edit().
If you call
data_edit()
inside another function and setviewer = "dialog"
, the parental function exits early when the data editor is closed. See example:This issue has been reported (https://github.com/rstudio/shiny/issues/1723) but it looks like the only solution is to switch to using
viewer = "browser"
orviewer = "pane"
indata_edit()
.