RBGrid Inline Editors
Overview
- RBGrid now supports rich inline editors per column, driven by optional schema and user preferences.
- Editors include enum dropdowns, date/datetime pickers, numeric spinners (min/max), secure blurred fields, reference (QBE) pickers, and large-text editors (Markdown/JSON/YAML).
How It Works
- Column schema: pass
columnSchemato RBGrid as a map of columnKey → schema. - Supported schema fields:
type: string | number | boolean | date | datetime | enum | object | json | markdown | imageenumValues: string[] (required for enum)min/max/step: numeric constraintsrefType: enables reference picking viaonReferencePicksecure: when true, renders blurred until clicked (e.g., passwords, api keys)editor: default | markdown | json | yaml | spreadsheet | image
- User preferences: provide
editorPreferencesmapping (e.g.,WorkflowTable#meta: "json") to force a field editor.
Usage Example
Interactive playgrounds load on the client. Refresh in a browser to edit this lesson.
Behavior
- Enum: inline
<select>withenumValues. - Date/Datetime:
<input type="date|datetime-local">. - Number:
<input type="number">withmin/max/step. - Secure: value is blurred and click-to-reveal; still respects aspect masking on the backend.
- Reference/QBE: when
refTypepresent andonReferencePickprovided, shows a Pick button which calls your handler to choose or create a related object. - Large text: if
editorpreference ismarkdown|json|yaml, the inline editor uses a multi-line textarea; complex editors (Markdown renderer, Spreadsheet) can be integrated subsequently and toggled by the same preference.
Preferences
- Store field editor choices under a custom key (e.g.,
UX:FieldEditors) viaUserPreferenceService.setCustomPrefsKey()and feed them intoeditorPreferences.
Notes
- Backend SecureField still governs masking/decrypt at the API boundary; the blurred UI is an additional UX safeguard only.
- For QBE, pass
onReferencePickto open your modal or inline picker and return the selected object.