Closed food-data-sci closed 3 years ago
Hello,
Can you provide a minimal example ? The search seems to be triggered too early, maybe using req
on search input will solve the issue.
Victor
Using req as in the folowing worked!
observeEvent(req(input$search),
{
searchTreeview(
inputId = 'tree_id',
pattern = input$search,
ignore_case = TRUE,
exact_match = FALSE,
reveal_results = TRUE,
collapse_before = TRUE
)
})
Thanks so much for an easy solution.
I am using treecheckInput and searchTreeview. When I open my app, the whole tree is expanded and all the items are in red. Is there a way to stop the tree from expanding before any value is typed into the search? collapse_before = TRUE works after something is typed into the search box but I would like the whole list to be collapsed before I do any search.