Search Module
Usage
search_ui(id, label = "Search...", multiple = FALSE, random = FALSE)
search_server(id, choices, start_random = FALSE)
Arguments
- id
A unique identifier for the module.
- label
The label text for the select input.
- multiple
Whether to allow multiple selections (default: FALSE).
- random
Whether to show a randomize button (default: FALSE).
- choices
A reactive expression that returns a vector of choices for the select input.
- start_random
Whether to select a random value when choices are updated.
Details
This module provides a reusable search component with a select input and optional randomize button. It can be used to create searchable drop-downs with support for multiple selection and random choice selection. The module handles updating choices dynamically and provides a reactive value for the selected item(s).