title: R Shiny DT - edit values in table with reactive - prevent paging reset
body: <p>I have created an application using reactiveValues to populate the datatable similar to the response here <a href="https://stackoverflow.com/questions/50470097/r-shiny-dt-edit-values-in-table-with-reactive">R Shiny DT - edit values in table with reactive</a></p>
  
  <p>What I cannot seem to figure out is after editing the table it resets to the first page.  This does not happen when the datatable is not created from a reactiveValues table.</p>
  
  <pre><code>library(shiny)
  library(DT)
  shinyApp(
    ui = fluidPage(
      DTOutput('x1'),
      verbatimTextOutput("print")
    ),
    server = function(input, output, session) {
      x = reactiveValues(df = NULL)
  
      observe({
        df &lt;- iris
        df$Date = Sys.time() + seq_len(nrow(df))
        x$df &lt;- df
      })
  
      output$x1 = renderDT(x$df, selection = 'none', editable = TRUE)
  
      proxy = dataTableProxy('x1')
  
      observeEvent(input$x1_cell_edit, {
        info = input$x1_cell_edit
        str(info)
        i = info$row
        j = info$col
        v = info$value
  
        x$df[i, j] &lt;- isolate(DT::coerceValue(v, x$df[i, j]))
       replaceData(proxy, x(), resetPaging = FALSE)  # important I have tried with and without this line no impact on page resetting
      })
  
      output$print &lt;- renderPrint({
        x$df
      })
    }
  )
  </code></pre>
  
  <p>I wanted to share that I figured out how to solve this, still a little confused as to why it was so complicated but if anyone else has the same issue.</p>
  
  <pre><code>  x = reactiveValues(df = NULL)
    x$df2 = NULL
    #Tells which data to pull based on how the OSC list is populated  
    FundData &lt;- observe({
      if(input$SelectFunds == 'None Selected'){
        x$df &lt;- head(QDataAnalystSummary,0)
      }else if(input$SelectFunds == 'Load OSC List'){
        tmp_funds &lt;- subset(QDataAnalystSummary,as.character(QDataAnalystSummary$OSC) %in% as.character(OSCData()$OSC))
        tmp_funds &lt;- subset(tmp_funds,tmp_funds$`Quarter End` == CurrentQtr)
        tmp_funds_new &lt;- NULL
        for(i in 1:nrow(OSCData())){
          tmp_fd &lt;- subset(tmp_funds,tmp_funds$OSC == OSCData()$OSC[i])
          tmp_funds_new &lt;- rbind(tmp_funds_new,tmp_fd)
        }
        tmp_funds_new
        x$df &lt;- tmp_funds_new
        x$df2 &lt;- tmp_funds_new
      }
      else if(input$SelectFunds == 'Search By Analyst'){
        tmp_funds5 &lt;- subset(QDataAnalystSummary,QDataAnalystSummary$Analyst %in% input$Analyst)
        tmp_funds5 &lt;-  subset(tmp_funds5,tmp_funds5$`Quarter End` == CurrentQtr)
        x$df &lt;- tmp_funds5
      })
   #Summary Table showing general fund info and current quarter stats for IC Meeting Funds 
    output$summary_ic &lt;-  DT::renderDT({
      QDAW &lt;- subset(QDataAnalystSummary,QDataAnalystSummary$OSC %in% OSCData()$OSC &amp; QDataAnalystSummary$`Quarter End` ==CurrentQtr)
      if(nrow(QDAW) &gt;= 1){
        QDAW$Notes &lt;- ''
        QDAW_new &lt;- NULL
        for(i in 1:nrow(OSCData())){
          tmp_fd &lt;- subset(QDAW,QDAW$OSC == OSCData()$OSC[i])
          QDAW_new &lt;- rbind(QDAW_new,tmp_fd)
        }
        QDAW &lt;- QDAW_new
      }
  
      datatable(QDAW,
                rownames = FALSE,caption = "Current Quarter Data",
                filter = "top",extensions = c('Buttons','ColReorder'),editable = list(target = 'cell',disable = list(columns=c(0:9))),
                options = list(initComplete = JS(
                  "function(settings, json) {",
                  "$(this.api().table().header()).css({'background-color':'rgb(85,114,138)','color': '#fff'});","}"),
                  autoWidth = TRUE,
                  columnDefs = list(list(width = '2%', targets = list(0,1,6,7,8,9)),
                                    # list(width = '20%', targets = list()),
                                    list(className = 'dt-center',targets = c(1,5,6,7,8,9)),
                                    list(visible = FALSE, targets = c(0,5,8,9))
                  )
                  ,resetPaging = FALSE,
                  bFilter = 1,bSortClasses = 1,
  
                  aLengthMenu = list(c(10,20,50, -1), list('10','20','50','All')),iDisplayLength = 10,
                  searchHighlight = TRUE,
                  dom = 'Blfrtip',buttons = c('colvis','excel','copy'),colReorder= TRUE,
                  scrollX = TRUE,
                  # scrollY = "1000px",
                  fixedHeader = TRUE,
                  paging=TRUE,server = TRUE))%&gt;%
                      formatRound('Trailing Average', 2) %&gt;%
                      formatStyle('Trailing Average',
                    color = 'white',
                    background = styleInterval(c(50,75),c('green','orange','red'))) %&gt;%
                  formatCurrency('AUM')
                })
  
  
  
    proxy = dataTableProxy('summary_ic')
  
    observeEvent(input$summary_ic_cell_edit, {
      info = input$summary_ic_cell_edit
      str(info)
      i = info$row
      j = info$col + 1  # column index offset by 1
      v = info$value
  
      x$df2[i, j] &lt;&lt;- isolate(DT::coerceValue(v, x$df2[i, j]))
      replaceData(proxy, x$df2, resetPaging = FALSE, rownames = FALSE)
    })
  </code></pre>