MantineOptionsView#

@palmyralabs/rt-forms-mantine · form/view/MantineOptionsView.tsx

Overview#

Read-only option-label display — counterpart to MantineSelect / MantineRadioGroup. Looks up the stored key in a options object (not an array) and renders the matching label, so a stored code like 'ACTIVE' displays as "Active".

Props — ISelectDefinition & TextViewAttributeDefinition#

Common field props plus:

Prop Type Purpose
options Record<string, string> Keyed lookup map — options[value] is the rendered label
textAlign, variant (see overview) Shared view props

Not an array. Unlike MantineSelect, which takes Array<{ value, label }>, this widget expects an object keyed by value:

{ ACTIVE: 'Active', ARCHIVED: 'Archived' }

Ref#

Narrow { getValue(): any } — unlike the other views, this one does not spread getFieldHandler and has no focus() method.

Example#

<MantineOptionsView
  attribute="status"
  label="Status"
  options={{
    ACTIVE:   'Active',
    ARCHIVED: 'Archived',
    DRAFT:    'Draft',
  }}
/>