From 28c23fa20420db1cde10212a63353b9a0cc9e465 Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Thu, 23 Nov 2023 07:15:39 -0600 Subject: [PATCH] Add output to hopefully better-populate logs. (#115) --- R/book.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/R/book.R b/R/book.R index ddc549f..9f1d0bf 100644 --- a/R/book.R +++ b/R/book.R @@ -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",