So, I've created the following reprex, but hopefully someone can explain it to me. Basically I have 2 inputs, one to select a row from a data frame (Player), and one to filter the data frame (Team). I want to display the selected row in table format, bur only if the row has been selected so as not to only display the column headers. If I filter then select a row, or just select a row, it works just fine. If at that point I change the filter input (Team) , the player data is cleared, but the table is still displayed with no data, so obviously req(player()$Name) is staying true forever once it is satisfied once. Any ideas how to "clear" or "reset" that?
Hi @DJG. If I'm understanding correctly, I believe the issue is resolved by removing the first observe() statement and adding req(input$player) inside of output$player_info. This requirement ensures the table will show only when input$player is populated. Please see the updated code below.
Sorry for the tardy response. I have been off the grid for a few days.
I feel like a bit of an idiot for not doing it that way from the beginning, so thank you for the solution. I am still curious about how req() works and if there is a way to clear that state, but I'll leave that for another time.