From 09851d3c4c5ec3ab0248893801065240fe066c7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu>
Date: Sat, 2 May 2020 19:44:02 +0200
Subject: [PATCH] Add reactive function to get compound inputs

* R/shiny-ui-config.R(rf$get_compounds): New reactive function.
---
 R/shiny-ui-config.R | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/R/shiny-ui-config.R b/R/shiny-ui-config.R
index c0e3332..cf718c4 100644
--- a/R/shiny-ui-config.R
+++ b/R/shiny-ui-config.R
@@ -150,6 +150,18 @@ react_conf_f <- function(input,output,session,rv,rf) {
         message('Relative project path is: ',res)
         res
     })
+
+    rf$get_compounds <- react_f({
+        ## Consult the input text boxes for any files, then load the
+        ## compound tables.
+        rv$conf$compounds <- shiny::reactiveValues(known=input$known,
+                                                   unknown=input$unknown,
+                                                   sets=input$sets)
+        rv <- load_compound_input(rv)
+        rv$input$tab <- lst2rv_lst(rv$input$tab)
+        rv
+    })
+
     
     rf
 }
-- 
GitLab