The two reactive dataframes are dynamic. But the output is getting merged

The outputs (2 dataframes) are getting merged. Since the dataframe is dynamic, I am expecting the output to be displayed one after the other. (Flights and Tactics are tabpanels).
Using the similar DT::renderDataTable to display rvt(). In the ui part, I am using column(3,dataTableOutput('mytable1')) and column(3,dataTableOutput('mytable2')).
Please find the code below.

ui <- fluidPage( 
  fluidRow(
    column(3, wellPanel(
      textInput("account","Enter the Account Name",""),
      tags$hr(),
      actionButton("goButton", "Go")
    )),
    mainPanel(
        tabsetPanel(
          tabPanel("Flight",            
                   textInput("flightname","Enter the flight Name","")
                   tags$hr(),
                   actionButton("go", "Go")),
          tabPanel("Tactic", 
                   textInput("tacticname","Enter the tactic Name",""),
                   tags$hr(),
                   actionButton("go1", "Go"))
        ),
      column(3,dataTableOutput('mytable1')),
      conditionalPanel(
        condition = "input.go1 != 0",
        column(3,dataTableOutput('mytable2')))
     )
  ))
server <- function(input, output) {
rv <- reactiveValues(fli = data.frame("FlightName" = character(), "AddedValue" = character()))

  observeEvent(input$go, {
    # Bind new row to rv$fli
    rv$fli <- rbind(
      rv$fli, 
        data.frame("Account"=input$account"FlightName"=input$flightname)
    )
  })

  rv1 <- reactive({rv$fli})

  output$mytable1  <- DT::renderDataTable(
    DT::datatable(
      rv1(),
      extensions = 'Buttons',
      options = list(
        paging = TRUE,
        dom = 'tB',
        buttons = c('copy', 'csv', 'excel','pdf')
      ),
      class = "display"
    ))

  rv <- reactiveValues(tact = data.frame("TacticName" = character()))

  observeEvent(input$go1, {
    rv$tact <- rbind(
      rv$tact, 
      data.frame("Account"=input$account,"TacticName"=input$tacticname))
  })

  rvt <- reactive({rv$tact})
}}

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.