mjwestgate / revtools

Tools to support research synthesis in R
https://revtools.net
48 stars 26 forks source link

Suggestion: save notes on the fly without needing to click on "Save Notes" #33

Open jsavinc opened 3 years ago

jsavinc commented 3 years ago

I'm screening abstracts at the minute and noticed it feels like I'm clicking on Save Notes a lot, so could the notes save as they are typed instead (reactively in response to a change in the text box contents?) I assume the use case for Save Notes is to prevent destructive changes (i.e. deleting the entire text field) automatically overwriting what was there previously?

jsavinc commented 3 years ago

This may be as simple as changing the following in screen_abstracts.R (line 338):

    observeEvent(input$notes_save, {
      data$raw$notes[progress$row] <- input$abstract_notes
    })

to

    observeEvent(input$abstract_notes, {  # save every time the input changes
      data$raw$notes[progress$row] <- input$abstract_notes
    })