Skip to main content

ExpressionEditorProps

Defined in: expr/src/ui/ExpressionEditor.tsx:34

Props for ExpressionEditor.

Properties

hideKindSelector?

optional hideKindSelector?: boolean

Defined in: expr/src/ui/ExpressionEditor.tsx:59

Hides this node's kind selector. Used for the root right-hand side node, which is always a function call; nested argument editors keep their selectors so users can pick fields, literals, or further function calls.


inputType?

optional inputType?: InputType | null

Defined in: expr/src/ui/ExpressionEditor.tsx:53

Input type inherited from the rule's field configuration. Threaded to the literal value editor (driving the rendered input type and, with parseNumbers, number coercion) and down to nested function-argument editors — so expression literals are parsed the same way as the base configuration would parse a value for that field.


meta

meta: ExpressionFunctionMetaRegistry

Defined in: expr/src/ui/ExpressionEditor.tsx:40

Function metadata (label/arity) for functions selectable in func nodes.


node

node: ExpressionNode | undefined

Defined in: expr/src/ui/ExpressionEditor.tsx:36

The node to edit. When undefined, an empty value node is assumed.


onChange

onChange: (node: ExpressionNode) => void

Defined in: expr/src/ui/ExpressionEditor.tsx:38

Called with the next node on any edit.

Parameters

ParameterType
nodeExpressionNode

Returns

void


schema

schema: Schema<{[key: string]: unknown; className?: Classname; comparator?: string | ((f: {[key: string]: unknown; className?: Classname; comparator?: string | ((f: { [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (string...; defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }> | FlexibleOption<string>[] | string | FlexibleOption<string>[]; placeholder?: string; subproperties?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (string | FlexibleOpt...>; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType); values?: FlexibleOptionList<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }>; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }, operator: string) => boolean); defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }> | FlexibleOption<string>[] | string | FlexibleOption<string>[]; placeholder?: string; subproperties?: FlexibleOptionList<{[key: string]: unknown; className?: Classname | undefined; comparator?: string | ((f: { [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (string | FlexibleOpt..., operator: string) => boolean); defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null | undefined; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<string>[] | (string | FlexibleOption<...>)[] | undefined; placeholder?: string; subproperties?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (s...; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType) | undefined; values?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | undefined; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }>; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType); values?: FlexibleOptionList<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }>; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }, string>

Defined in: expr/src/ui/ExpressionEditor.tsx:46

Query builder schema. The nested selectors render via schema.controls.valueSelector (and the literal editor via the inherited value editor) so they inherit the active theme (Bootstrap, MUI, etc.).


testID?

optional testID?: string

Defined in: expr/src/ui/ExpressionEditor.tsx:61

Test/id prefix for this node (children derive nested ids from it).


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.