Skip to content

Commit

Permalink
fix: bug with NA row logic
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepanshKhurana committed Aug 9, 2024
1 parent d66b40c commit 2ce64f5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/view/mod_selector.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ server <- function(id, app_state) {

shiny$observeEvent(input$row, {

if (input$row > app_state$total_rows()) {
if (shiny$isTruthy(input$row) && input$row > app_state$total_rows()) {
shiny$updateNumericInput(
session = session,
"row",
Expand All @@ -129,10 +129,13 @@ server <- function(id, app_state) {
)
} else {
app_state$selected_row <- shiny$reactive({
input$row
ifelse(
shiny$isTruthy(input$row),
input$row,
1
)
})
}

})

shiny$observeEvent(
Expand Down

0 comments on commit 2ce64f5

Please sign in to comment.