reactable icon indicating copy to clipboard operation
reactable copied to clipboard

Pass a search widget string into the global filter

Open LELULAS opened this issue 3 years ago • 1 comments

When using reactable in a shiny app, I'd like to hide the table until a user inputs a global search into a search widget. How can I pass the string from the search widget into the global search of the reactable?

LELULAS avatar Aug 18 '23 05:08 LELULAS

If you have the search widget in Shiny, there's not a way to set the global search value via Shiny directly, but that could definitely be a future enhancement.

For now, the only way to do this is using the JavaScript API - reactable.setSearch(). There's a quick demo in custom search input example, but hooking this up to Shiny would take a bit more effort. I can't remember how to do this off the top of my head, but it's probably described in the JavaScript Events in Shiny doc page.

glin avatar Aug 20 '23 05:08 glin