CollectionEditor

Editor for collection components (array-like rows of sub-fields). Provides row selection, expansion, and CRUD-like operations.

Properties

Link copied to clipboard
abstract override val component: CollectionComponent

Underlying collection component backing this editor.

Link copied to clipboard
abstract val decorators: List<Decorator>

Decorators (icon/label) for this component; from field or column when in a table cell.

Link copied to clipboard
abstract val disabled: Boolean

Whether the component is currently disabled.

Link copied to clipboard

Active filters applied to the visible rows.

Link copied to clipboard
abstract val focusRequest: Live<Unit?>

Reactive signal for programmatic focus. When focus is called, the UI observes this and requests focus on the field. After the UI handles the request, it should call clearFocusRequest. Gaining focus triggers onFocus in the Form.

Link copied to clipboard
abstract val gotoRowTarget: Live<GotoRowTarget?>

Observable target for row navigation. Set when goto is called. UI should observe this and perform scroll/open form, then call clearGotoRowTarget.

Link copied to clipboard
abstract var hidden: Boolean
Link copied to clipboard
abstract var id: String
Link copied to clipboard
abstract var identifier: String

Unique editor identifier; affects formula dependency resolution.

Link copied to clipboard
abstract val metadata: JoyMap?

Optional metadata map for custom extensions. Available only for Field-based components.

Link copied to clipboard
abstract var required: Boolean
Link copied to clipboard
abstract val selected: Live<List<CollectionSelection>>
Link copied to clipboard
abstract override val state: Live<CollectionEditorState>

Reactive state snapshot of the collection editor.

Link copied to clipboard
abstract val tip: ToolTip?

Optional tooltip associated with the component.

Link copied to clipboard
abstract var title: String
Link copied to clipboard
abstract var type: Type

Functions

Link copied to clipboard
abstract fun addAfter()

Insert a new row after the current selection.

Link copied to clipboard
abstract fun addFormAfter()

Insert a new form row after the current selection.

Link copied to clipboard
abstract fun clearFocusRequest()

Clear the focus request. Called by the UI after it has requested focus, so that subsequent focus calls can trigger again.

Link copied to clipboard
abstract fun clearGotoRowTarget()

Clear the current goto row target. Called by UI after navigation is handled.

Link copied to clipboard
abstract fun close()

Exit edit mode discarding transient UI state.

Link copied to clipboard
abstract fun delete()

Delete the selected rows.

Link copied to clipboard
abstract fun edit(manager: RowManager, table: TableEditor = root(), rowNumber: Int = 1)

Open the edit form directly with a RowManager. This is useful for navigating to nested rows without expanding parent rows first.

abstract fun edit()

Enter edit mode for the selected row.

abstract fun edit(row: RowEntry)

Enter edit mode for a row.

Link copied to clipboard
abstract fun expandRow(entry: RowEntry)

Expand a specific row to show its details/form.

Link copied to clipboard
abstract fun findRowManager(rowId: String): RowManager?

Find a RowManager by row ID in the entire collection hierarchy (including nested/collapsed rows). This searches through the raw data structure, not the UI entries.

Link copied to clipboard
abstract fun focus()

Request focus on this field. Triggers focusRequest, which the UI observes to perform FocusRequester.requestFocus. When focus is gained, onFocus is invoked automatically via the normal focus flow.

Link copied to clipboard
abstract fun goto(rowId: String, columnId: String? = null, config: GotoConfig = GotoConfig.Default): NavResponse

Navigate to a specific row within this collection.

Link copied to clipboard
abstract fun hide()

Hide the component and update editor state accordingly.

Link copied to clipboard
abstract fun moveDown()

Move the current row down.

Link copied to clipboard
abstract fun moveUp()

Move the current row up.

Link copied to clipboard
abstract fun resolveConditions()

Re-compute conditional logic (hide/disable, etc.) for this component.

Link copied to clipboard
abstract fun root(): TableEditor

Root table editor that renders and manages the collection's rows.

Link copied to clipboard
abstract fun select(item: RowEntry?, origin: Origin = Origin.User): RowEntry?
Link copied to clipboard
abstract fun selectAll(entry: TableEntry)

Select all rows within a table entry.

Link copied to clipboard
abstract fun selection(entry: TableEntry): Selection

Current selection information for a table entry.

Link copied to clipboard
abstract fun setHiddenTo(value: Boolean, reason: HiddenReason, liveUpdate: Boolean = false)

Set hidden state explicitly.

Link copied to clipboard
abstract fun show()

Show the component and update editor state accordingly.

Link copied to clipboard
abstract suspend fun submit(update: (Submission) -> Unit = {})

Submit row changes via update, supporting batched mutations.

Link copied to clipboard
fun ComponentEditor.tableEditor(rowId: String? = null, schemaId: String? = null, parentPath: String? = null): TableEditor?

Resolve a TableEditor for this ComponentEditor.

Link copied to clipboard
abstract fun tableForSchema(schemaId: String): TableEditor?

Find a table editor for the given schema id (root or nested). Used by column conditional logic to resolve nested tables.

Link copied to clipboard
abstract fun toggle(entry: LazyEntry)

Toggle lazy row loading/expansion for a given entry.

Link copied to clipboard
abstract fun toJsonObject(): JsonObject
Link copied to clipboard
abstract fun toJsonString(): String
Link copied to clipboard
abstract fun toMap(): MutableMap<String, Any?>
Link copied to clipboard
abstract fun unselect(item: RowEntry?, origin: Origin = Origin.User): RowEntry?
Link copied to clipboard
open fun unselectAll(origin: Origin = Origin.User)
Link copied to clipboard
abstract fun updateDependentsValues()

Recompute and push values to dependents driven by this component.

Link copied to clipboard
abstract fun validate(): ComponentValidity

Compute validity based on current data and constraints.