I currently have a computed list that is rendered via insertUI like this
(note that in this case for simplicity the list is hardcoded, but it will be dynamically built from data)
entrylist <- list(
class="list-group",
a(href="#", class="list-group-item",
h4(class="list-group-item-heading", "entry1"),
p(class="list-group-item-text", "Description of entry1")
),
a(href="#", class="list-group-item",
h4(class="list-group-item-heading", "entry2"),
p(class="list-group-item-text", "Description of entry2")
))
insertUI(
selector="#entries",
where="afterBegin",
ui=do.call(div, entrylist)
)
What I want to achieve is that, when the user clicks on one of the list entries, a reactive variable is assigned to some sort of unique id, so that I can display the information associated to that entry.
I am not sure actionLink is a solution here, as I am basically having multiple links created ad-hoc and dynamically. Searching google for "shiny reactive anchor" or similar yielded no actual results.