I have a card called business , which is downloaded from a natural earth site. What I'm doing here, I created a basic map output that shows a map. I mainly use two columns, which are admin (this is the name of the country) and economy here. Then I added a drop-down list called business under ui so that when I click on the country polygon the list is updated and display the country that I click. I assume that when I write p <- input$Map_shape_click , brilliant would know that p is a business object, so it has an admin column, and I refer to this admin ID to update the business drop-down list. But that does not work. The link shows what I see - the list is not updated when I click on another country.

server.r
country <- readOGR(dsn = tmp, layer = "ne_110m_admin_0_countries", encoding = "UTF-8") business<-country[ country@data $admin %in% c("Brazil","Colombia","Panama","Kazakhstan","Argentina","India","","Chile","Dominican Republic","United Kingdom","El Salvador","United States of America"),] business@data $category <- factor(sample.int(20L, nrow( business@data ), FALSE)) shinyServer(function(input, output,session) { output$Map <- renderLeaflet({ factpal <- colorFactor(topo.colors(20), business@data $category) state_popup <- paste0("<strong>Name of the country </strong>", business$admin, "<br><strong> information is </strong>", business$economy) leaflet() %>% addProviderTiles("CartoDB.Positron") %>% addPolygons(data=business, layerId=~admin, fillColor= ~factpal(category), fillOpacity = 0.7, color = "#BDBDC3", weight = 1, popup = state_popup, highlight = highlightOptions( weight = 5, color = "#666", dashArray = "", fillOpacity = 0.7, bringToFront = TRUE))}) observeEvent(input$Map_shape_click, {
ui.r
navbarPage("Market Portal", tabPanel("About", bootstrapPage( leafletOutput("Map",width="100%",height="800px"), absolutePanel(top=100, right=50, selectInput("Business", "Business", c("Brazil","Colombia","Panama","Kazakhstan","Argentina","India","Chile","Dominican Republic","United Kingdom","El Salvador","United States of America"), selected="") ))))