Hi Nir,
That was just a sample. below is the actual code for that but this is in markdown. I tried with below
expectUpdate(app, Tic = 'setosa', Date = as.Date('2019-12-27'), Submit = 1, output = 'table', timeout = 3000)
---
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(rhandsontable)
library(shinyjs)
library(dplyr)
library(formattable)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
df <- structure(list(Date = structure(c(1541662915.921, 1541662949.842,
1541662949.845, 1541662949.845, 1541662993.957, 1541662915.921,
1541662949.842, 1541662949.845, 1541662949.845, 1541662993.957
), class = c("POSIXct", "POSIXt"), tzone = "UTC"), Date1 = structure(c(17843,
17843, 17843, 17843, 17843, 17843, 17843, 17843, 17843, 17843
), class = "Date"), ID = structure(c(1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 2L), .Label = c("AAA", "BBB"), class = "factor"),
Value = c(68, 70175, 71107, 702175, 72638, 7238, 739, 738469,
75901, 7106), Status = structure(c(1L, 1L, 2L, 2L, 1L, 2L,
1L, 1L, 2L, 1L), .Label = c("Approved", "Pending"), class = "factor")), row.names = c(NA,
-10L), class = "data.frame")
dateRangeInput("Date","",start = '', end = '',format = "yyyy-mm-dd",separator = "-")
selectInput("Tic","",choices = c("ALL",as.character(df$ID)),selected = "ALL")
actionButton("Submit","Submit")
textOutput("Total")
tableOutput("table")
data2 <- reactiveVal(df[1:2, ])
observeEvent(input$Submit,{
if(input$Date == ""){
df1 <- df[1:2, ]
}
else if (input$Date != ""){
df1 <- df
} else {
df1 <- df %>% filter(Date %in% input$Date && ID %in% input$Tic)
}
data2(df1)
})
output$table <- renderTable({
data2()
})
```