Sets up reactive observers for a DataTable component to handle user interactions and state changes. This function establishes the necessary event handlers for selection changes and synchronizes the component with the shared application state.
Usage
setup_datatable_observers(
component_id,
session,
components,
shared_state,
on_selection_change,
registry = NULL
)
Arguments
- component_id
Character string. Unique identifier for the DataTable component.
- session
Shiny session object. The current Shiny session for reactive context.
- components
List. Collection of UI components in the application.
Reactive values object. Shared state container for cross-component communication.
- on_selection_change
Function. Callback function to execute when table selection changes.
- registry
List or NULL. Optional registry for component management. Defaults to NULL.