Skip to content

Is it possible to save the state of the user-modified reactable to a data frame (or file) [Feature]:  #47

Open

Description

@chrisumphlett

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Description

I'm using rhandsontable to allow end users to update values of a table in a shiny app, and then save it to a file. But the UX is terrible, when deployed to Posit Connect (other users have reported this on its GH). I had to replace a nice reactable with that. I'm hoping I can have both the aesthetics and functionality of reactable with the ability to modify and save.

Problem

Wanting a user to update info and have it persist to the next time they access it (by saving it somewhere and using that to update the source data).

Proposed Solution

I don't know if this is possible currently or not. An out of the box function would be used by many people I think, but if I can do something manually now I'd like to (and/or I can help contribute to this development).

Alternatives Considered

rhandsontable is the only package I've found to do this, it has a glitchy UI when deployed to a server and it has not been updated for a long time.

Activity

  1. chrisumphlett commented on Nov 28, 2023

    @chrisumphlett
    Author

    A not very good, but possible workaround. Write out output$text to a file and then parse that.

    I modified the custom inputs sample code like this:

    output$text <- renderText({
          req(input$text)
          message(getwd())
          sink("reactable_extras.log", append = TRUE)
          values <- input$text
          print(paste0(
            "Text: ",
            string_list(values)
          ))
          sink()
        })
    

    Then, as I make changes in the text column, each change in character is logged.
    image

    I could take the last row for each distinct row : N... column : X group and try and use that to go back and update the source data.
    The effort it would take for me to do this is probably prohibitive, given the likely shaky outcome (at best). I would have significant downstream work to do as well, because my current process saves a file to Azure blob storage, then uses Azure data factory to upsert that file to a database.

  2. fabrizioTerrAria commented on Oct 17, 2024

    @fabrizioTerrAria

    Hi @chrisumphlett, this would be a very usefull feature.
    Did you find a solution for your problem ?
    Thank you very much.
    Fabrizio

  3. chrisumphlett commented on Oct 17, 2024

    @chrisumphlett
    Author

    No. Admittedly, I haven't tried. I watched a portion of a webinar from Posit about using the DT package.
    Before trying with reactable I had implemented with rhandsontable I believe it was called. Very buggy when deployed to Posit Connect though it worked fine locally (Shiny app). That package hadn't been updated for years.

  4. ipgx commented on Jan 28, 2026

    @ipgx

    Just found out about this package. I wrote previously something that would parse text and then replaced the last row with the final text. But this seemed too elementary and compromised on user experience a lot. If this feature is not implemented, can anyone share a workaround ? I have sf features like MultiPolyline and need to select them from Map and then add/edit data in a column using Reactable. Thanks in advance!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions