Hi all,
In my below application, all is working well, Once i select filter and Submit, the data is loading good.
I click on clear button, all data is removed.
Problem is again if I press submit button, the data is not loading. Can anyone please help
---
title: "Untitled"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(shiny)
library(shinydashboard)
library(shinycssloaders)
library(DT)
library(dplyr)
library(formattable)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
selectInput("Tic","",choices = c("",as.character(iris$Species)),selected = "")
actionButton("Submit","Submit")
actionButton("Clear","Clear")
tableOutput("table")
data2 <- eventReactive(input$Submit,{
if(input$Tic != ""){
iris <- iris %>% filter(Species %in% input$Tic)
}
})
output$table <- renderTable({
data2()
})
observeEvent(input$Clear,{
output$table <- renderTable({
})
})
```