Skip to contents

Renders a compact overview of data as a multi-select table and returns the selected row indices (relative to data) as a reactive. When data carries the persona contract (see LLMR::llm_persona_overview()), the overview columns are chosen automatically; otherwise the first few columns are shown.

Usage

persona_selector_server(
  id,
  data,
  overview = NULL,
  page_length = 8L,
  height = "260px"
)

Arguments

id

Module id.

data

A persona data frame (or a reactive returning one).

overview

Optional overview data frame, or a function function(df) building one. Defaults to LLMR::llm_persona_overview() when LLMR is available, else the first columns of data.

page_length

Rows per page in the table. Default 8.

height

CSS height for the scrollable table body. Default "260px".

Value

A reactive returning an integer vector of selected row indices into data (integer(0) when nothing is selected). When DT is not installed the module renders nothing and the reactive is always integer(0), matching the install guidance shown by persona_selector_ui().