0

I use Timevis package in my Shiny app. my data table is "timevisData", and sometimes the user change the data in the table. I want to show the current data table and to see every change immediately. Now I can see updates just if I make refresh, but I want to see it automatically

This is the coomand:

timevis(data =   timevisData,
              
              groups =timevisDataGroups[timevisDataGroups$content %in% myString(),],
              options = list(editable = TRUE)
              )

asdf1212
  • 389
  • 2
  • 11
  • Do you mean to that: new_data <- reactive({ timevisData }) timevis(data = new_data() ...) – asdf1212 Dec 27 '21 at 15:34
  • It would be easier to help more if you could provide a [minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) of the app, and how the user modifies `timevisData` through inputs to Shiny. – Waldi Dec 27 '21 at 15:45
  • In TimeVis package there is option to add and remove data. when some user adds/removes data and click on "save" all the data is saving in some folder as RDS file. when other user open the app, first of all the app load the RDS file, and every 1sec is loading again, in case there are some changes. when some user click on refresh he can see all the updates. I want that if some user adds data and click on save, the other user will see imminently the changes in his screen. – asdf1212 Dec 27 '21 at 16:08
  • OK, I see, this wasn't how I first understood your question. Perhaps have a look at: https://shiny.rstudio.com/reference/shiny/1.6.0/reactiveFileReader.html to update regularly data according to .RDS content. This can be tricky to handle though : changes made by one user may delete on-going changes by another user – Waldi Dec 27 '21 at 16:13
  • @Waldi TY!! its working :) – asdf1212 Dec 28 '21 at 14:15
  • Perfect, glad I could help ;-) – Waldi Dec 28 '21 at 14:17

0 Answers0