@@ -816,7 +816,7 @@ eDTServer <- function(
816816
817817 observeEvent(input $ DT_cell_edit , {
818818 rv $ edits <- input $ DT_cell_edit
819- rv $ edits_react <- rv $ edits_react + 1
819+ rv $ edits_react <- rv $ edits_react + 1
820820 })
821821
822822 observeEvent(rv $ edits_react , {
@@ -1080,7 +1080,7 @@ eDTServer <- function(
10801080 }
10811081 })
10821082
1083- observeEvent(input $ confirmCommit , {
1083+ observeEvent(input $ confirmCommit , {
10841084 req(! is.null(effectiveChanges()) && isTruthy(effectiveChanges()))
10851085 modified <- effectiveChanges()
10861086 cols <- as.character(dplyr :: tbl_vars(data()))
@@ -1119,7 +1119,7 @@ eDTServer <- function(
11191119 if (! checkForeignTbls(inserted , foreignTbls())){
11201120 stop(" You made invalid edits to a row." )
11211121 }
1122- inserted <- inserted [,cols ]
1122+ inserted <- inserted [,cols , drop = FALSE ]
11231123
11241124 if (nrow(deleted )){
11251125 if (inherits(result , ' tbl_dbi' ) & in_place()){
@@ -1149,14 +1149,15 @@ eDTServer <- function(
11491149 DBI :: dbRemoveTable(dbplyr :: remote_con(result ), temp_name )
11501150 }
11511151 }
1152+
11521153 if (nrow(edited )){
11531154 result <- e_rows_update(
11541155 x = result ,
11551156 y = edited ,
11561157 match = match ,
11571158 by = keys(),
1158- in_place = in_place())
1159- }
1159+ in_place = in_place())
1160+ }
11601161
11611162 if (nrow(inserted )){
11621163# Needed code should there be a switch to dbplyr::rows_insert
@@ -1187,7 +1188,7 @@ eDTServer <- function(
11871188 }
11881189
11891190 rv $ committedData <- result
1190-
1191+
11911192 # Set modified and rendered to comitted version
11921193 # re-read data in case of in_place modification
11931194 # This is because certain backends might modify the row further with defaults etc.
0 commit comments