Open bbest opened 3 years ago
Hi @bbest, it looks like I need access to the data | marineenergy.app - Google Sheet - either cdobbelaere@ucsb.edu or cristinadobbelaere@gmail.com should work. Thanks!
Ah whoops, I should've done that already. Ok, just gave you access :)
No worries, just got it! @bbest
Ok, looks like you got this to work well in Google Sheets but the multiple levels of hierarchy seem too complicated to handle with its data validation:
Ideally, something like Access subdatasheet would be available in Shiny DT::datatable(), eg Access 2016 Tables: Subdatasheets - YouTube @ 8:20:
But here's what we found:
This solution seems to work :) Manually edit child row in shiny datatable - Stack Overflow:
See DTedit-subdatasheet/
test.R
Hi @cdobbelaere, here also is a more thorough explanation of this NestedData()
approach:
Thanks @bbest! Very helpful.
Actually @cdobbelaere, I'm thinking we could handle all of this more simply with selectizeInput(..., create = T)
inside a renderUI()
and some observe()
functions to detect a new list item plus updateSelectizeInput()
. See: Shiny - Using selectize input:
# allow creation of new items in the drop-down list
selectizeInput(
'foo', label = NULL, choices = state.name,
options = list(create = TRUE)
)
@bbest - Sounds like a good plan of action - will look into it right now.
Are we thinking that we'd update the project choices (via create = TRUE
) for the DTedit ferc docs table as a whole, or would this be for a separate tab with the docs/sections/URLs corresponding to each project?
I was initially using this approach for updating the project choices for the DTedit ferc docs table, but the selectizeInput() and selectize.options didn't seem to be working (they were from the DavidPatShuiFong modularized version of DTedit), similarly to how we were having difficulties adding in checkboxInputs.
Hi @bbest, exciting news!! I was finally able to get the correct DavidPatShuiFong version of DTedit installed, and we now have checkboxInputs functioning! Now to see if we can get the selectize.options from this particular commit in order.
Screenshots showing
checkboxInput functionality
ability to create a new project within edit panel
We can use update.R
's update_ferc_docs()
and update the GoogleSheet data | marineenergy.app - Google Sheets with googlesheets4::sheet_write()
.
Transfer:
from:
documents
data | marineenergy.app - Google Sheetto: unique sheets that use drop-downs to get at
project_docs
,project_doc_sections
and consume into db with
update_ferc_docs()
in/scripts/update.R