Organization Selector
What It Is For
Lets staff choose an organization by its record identity while the shared picker resolves its label and search context. The organization-selection responsibility is implemented by OrganizationPicker, a local affiliation slot and the shared organization source. It has no dedicated OrganizationSelector export. The source’s live query adapter and mock list adapter supply the same logical option contract to different consuming controls.
Where It Is Used
The OrganizationPicker form wrapper and the OrganizationPickerSlot affiliation adapter serve contact forms. Create Organization uses organization selection for hierarchy through its compiled form; the slot is used only while adding an affiliation, not to move an existing affiliation. Create Contact and Edit Contact use OrganizationPicker-valued form controls and the affiliation drawer’s organization slot. Create Organization uses the record-field organization variant for hierarchy. The drawer renders this selector only in Add mode.
How It Behaves
OrganizationPicker resolves and locally matches organization options for a compiled form field. The shared affiliation slot instead renders the generic RecordPicker with the workspace’s organization source and a stored-name fallback. The source presents organization-specific context, including record number, parent and location when present. Live reads use the organization query adapter; mock reads use the capped CRM list adapter. The source retains held inactive values while filtering fresh options. No named OrganizationSelector export exists at the pinned commit; this design names the reusable responsibility implemented by those existing pieces.
Its Contract
The wrapper owns neither the saved organization reference nor validation. It resolves the caller’s identifier and emits identifier text when selection changes. The affiliation slot adapts the generic picker’s option into identifier and name because an affiliation draft carries both. Source objects are memoized per workspace and reused across consumers. The older wrapper presents at most forty locally matched options and can request an additional source search when a typed query has no match. The generic picker has its own debounced search and result limit; consumers must not assume those presentations are identical.
States
Empty: The form wrapper offers Search organizations. Loaded: Name and secondary context identify matching choices. Held inactive or archived: Held-value resolution preserves naming and inactive context without offering all archived records anew. Loading or failed: The form wrapper distinguishes loading from load failure and no matching records. Slot unresolved: The supplied stored name, or the identifier, keeps the held organization visible.
Accessibility
The form wrapper delegates labels, required markers and errors to FieldShell, and exposes a named Clear action. The shared affiliation picker receives control identity and invalid state from its labeled drawer slot. Popover focus and command semantics are primitive responsibilities; complete keyboard and screen-reader verification is absent. Accessibility verification is an open obligation recorded in the component accessibility finding.
Open Design Questions
The recorded interaction is observed implementation, with proposed design intent. Component criteria need complete executable bindings and browser accessibility review. Screen owners must wire the registered components into their designs; this slice records usage without changing those screen contracts.