DillonHammill / DataEditR

An Interactive R Package for Viewing, Entering Filtering and Editing Data
https://dillonhammill.github.io/DataEditR/
381 stars 40 forks source link

Calling process terminates 30ms after exiting from DataEditR #49

Closed sch56 closed 2 years ago

sch56 commented 2 years ago

Approximately 30ms after returning from the DataEditR window, the calling process terminates with no exception or apparent cause.

If I insert a browser() step immediately after return this does not happen. If I step through in debug mode this does not happen.

iris <- iris
ro_cols <- c('Species')
edited_iris  <- DataEditR::data_edit(iris,
                                     col_edit = FALSE,
                                     col_readonly = ro_cols,
                                     col_names = FALSE,
                                     row_edit = FALSE,
                                     title = 'Iris data Set')
#browser()
for (i in seq(50)){
  print(sprintf('%d. %s', i, format(Sys.time(),'%H:%M:%OS3')))
  Sys.sleep(.01)
}

The loop at the end stops after 3 or 4 iterations. But if I enable the browser() then execution continues. Any help on how to prevent this much appreciated.

DillonHammill commented 2 years ago

This is a known issue with using shiny modal dialogs which is the default viewer in data_edit(). Switching the viewer to pane or browser should fix this issue.

data_edit(mtcars, viewer = "browser")
sch56 commented 2 years ago

Thanks for the pointer Dillon. Regards. I guess this is being triggered by a lower level aspect of the code. Unfortunate as otherwise it is really useful, but takes a while to diagnose what is going wrong as it doesn't when in debug. Maybe make 'browser' the default until the issue can be resolved.