Skip to main content

ExpressionFieldSelector()

ExpressionFieldSelector(props: FieldSelectorProps): Element

Defined in: expr/src/ui/ExpressionFieldSelector.tsx:82

Field-selector override hosting the rule's left-hand side. The inherited (or default) field selector still picks the rule's field — the governing field, which drives operator selection and validation — while an optional wrapper selector in front of it applies a function around that field, stored as rule.lhs = fn(field, …args). The governing field always occupies argument 0; any further arguments of a multi-argument function are edited by nested ExpressionEditors and may themselves be fields, literals, or further function calls. Selecting "no function" clears rule.lhs. Field changes re-point arg 0 (or drop the wrapper) atomically so the stored expression always references the current field, preserving the extra arguments.

The wrapper (and its argument editors) render only when QueryBuilderExpressionsProps.allowFunctionsOnLHS permits it for the current field/operator; otherwise the plain field selector renders.

Parameters

ParameterType
propsFieldSelectorProps

Returns

Element


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.