Skip to content

Commit

Permalink
Add output to hopefully better-populate logs. (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek authored Nov 23, 2023
1 parent 384e73b commit 28c23fa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions R/book.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@
query_book <- book_choices[book_choices == query$bookname]
})

# Only use the query_string to update the input when the app initially
# loads. After that, the input is the source of truth.
# Only use the query_string to update the input when the app initially loads
# AND THE UI INCLUDES THE INPUT. After that, the input is the source of
# truth.
observeEvent(
query_book(),
{
if (length(query_book()) && query_book() != input$selected_book) {
if (
length(query_book()) && length(input$selected_book) &&
query_book() != input$selected_book
) {
updateSelectInput( # nocov start (can't find a way to automate)
session,
"selected_book",
Expand Down

0 comments on commit 28c23fa

Please sign in to comment.