Skip to content

Reloading reactable after new data has been added / edited in edit_data_ui/edit_data_server #119

@yantralogics

Description

@yantralogics

This is an awesome package that has reduced so much of my work to create a functional CRUD application. I am leveraging edit_data_ui/server to allow users to do CRUD operations. I am using callback functions which perform database operations for persistent storage.

I have about 10 tabs in my main app, each tab is a module wrapped around edit_data_ui and tied to a separate database table.

Everything works like a charm except for following edge case:

  • User opens a specific tab, ADDs a piece of record. They get notification that record that's been added, I verify that it's been added in the database, in the same session if they try to DELETE the same record, it's met with error regarding missing primary key. This is because after I have added the record in database, the reactable is not looking at the latest database. I need to be able to reload data in reactable after each data operation.
  • I am aware of UpdateReactable function within reactable library that can do that, but that requires the input id of the reactable. I dont know how to get the inputid of the reactable that is embedded within edit_data_ui folder.

Are there more elegant way to get around this without using shinyjs::refresh() ? I dont want to reload the entire app.

Thanks in advance

yantralogics

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions