← Back to Home • Next: Select — Styles →
How the Select<T> control behaves while it is running: keyboard, filtering, grouping, paging,
validation, history, and view-only mode.
Which city? Seattle (Length: 7) ← prompt + live answer (follows the cursor) + ExtraInfo
Type to filter ← description (optional / dynamic)
North America ← group header (grouped lists)
› Seattle (Length: 7) ← focused item + ExtraInfo
New York (Length: 8)
Asia
Tokyo (Length: 5)
Filter: to_ ← live filter text (when filtering)
Page 1/2 ← pagination
Enter: confirm Esc: cancel ← tooltip
The answer line updates as you navigate and includes
ExtraInfo/ExtraInfoAsyncwhen set — useful when a row’s own text is too wide for the console and would otherwise be cut off, since this line scrolls horizontally (Home/End/←/→). Once confirmed (Enter), the final answer shown is the plain item text — noExtraInfo.
Every region can be recolored — see Styles.
| Key | Action |
|---|---|
↑ / ↓ |
Move focus up / down |
Page Up / Page Down |
Jump one page |
Ctrl+Home / Ctrl+End |
First / last item |
Enter |
Confirm the focused item (runs validation) |
Esc |
Abort → IsAborted == true |
| Any printable character | Type to filter (when Filter is not Disabled) |
Backspace |
Edit the filter text |
Home / End / ← / → |
Scroll the answer line horizontally (when it overflows the width) |
F1 |
Cycle tooltip content |
Ctrl+F1 |
Show / hide the tooltip |
Disabled items and separators are skipped automatically as you move.
When Filter is Contains or StartsWith, typing narrows the visible list in
real time:
AutoSelect, narrowing to a single selectable item confirms it
immediately — no Enter required.Disabled (the default) turns typing off entirely — arrow keys only.
AddGroupedItem / AddGroupedItems render a header above their items;
the header repeats appropriately as the list scrolls.HideTipGroup.AddSeparator draws a divider line (single, double, or a custom char).
Separators are purely visual and are skipped during navigation.Grouped and ungrouped items can be mixed in one list.
TextSelector decides the label; without it, ToString() is used and
enum members honor their [Display(Name = ...)] attribute.[Display(Order = ...)] when present.ExtraInfo adds a secondary label per row, wrapped by the extra-info
prefix/suffix (default ( ), configurable).Pressing Enter on the focused item:
PredicateSelected /
PredicateSelectedAsync, if configured.Disabled items cannot be focused for confirmation, so validation typically guards business rules (e.g., “this option is not available for your plan”) rather than availability.
Default(value) pre-highlights an item; provide
DefaultMatchBy for records/classes so the right row is located.EnableHistory, confirmed selections are stored on disk;
UseDefaultHistory (or Default(..., useDefaultHistory: true))
restores the last one on the next run.MinPrefixLength, MaxItems, ExpirationTime, FilterType, PageSize) match
the Input history options.ViewOnly() renders the list for display only:
Default to highlight one entry.ViewOnly(true) silently disables AutoSelect and any configured history — even if you
called EnableHistory/AutoSelect earlier in the chain, turning on ViewOnly overrides both.
There’s no warning; if the list looks like it stopped auto-loading history, this is why.Set per instance via Options(...), or globally on
PromptPlus.Config:
| Option | Effect on Select<T> |
|---|---|
EnabledAbortKey(false) |
Removes Esc — the user must choose |
HideAfterFinish(true) |
Erases the list after confirm — the whole control is erased, not just the interactive part |
ShowTooltip(false) |
Hides the keyboard hint line |
Prompt(...) / Description(...) |
Overrides the prompt / description text |
PageSize can be set per control (PageSize) or globally
(PromptPlus.Config.PageSize).
.Content == default(T) (e.g., null for reference types). Always branch
on IsAborted.DefaultMatchBy, Default on a
record/class may not match the intended row.…; the full item is still returned in .Content.Options