Skip to main content

Schema<F, O>

Configuration options passed in the schema prop from QueryBuilder to each subcomponent.

Extended by

Type Parameters

Type Parameter
F extends FullField
O extends string

Properties

accessibleDescriptionGenerator

accessibleDescriptionGenerator: AccessibleDescriptionGenerator

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:364


addRuleToNewGroups

addRuleToNewGroups: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:372


autoSelectField

autoSelectField: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:370


autoSelectOperator

autoSelectOperator: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:371


classNames

classNames: Classnames

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:349


combinators

combinators: FullCombinator<string>[] | OptionGroup<FullCombinator<string>>[]

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:350


controls

controls: Required<SetNonNullable<Partial<{ actionElement: ComponentType<ActionProps>; addGroupAction: null | ComponentType<ActionWithRulesAndAddersProps>; addRuleAction: null | ComponentType<ActionWithRulesAndAddersProps>; cloneGroupAction: null | ComponentType<ActionWithRulesProps>; cloneRuleAction: null | ComponentType<ActionProps>; combinatorSelector: null | ComponentType<CombinatorSelectorProps>; dragHandle: null | ForwardRefExoticComponent<DragHandleProps & RefAttributes<HTMLElement>>; fieldSelector: null | ComponentType<FieldSelectorProps<F>>; inlineCombinator: null | ComponentType<InlineCombinatorProps>; lockGroupAction: null | ComponentType<ActionWithRulesProps>; lockRuleAction: null | ComponentType<ActionWithRulesProps>; notToggle: null | ComponentType<NotToggleProps>; operatorSelector: null | ComponentType<OperatorSelectorProps>; removeGroupAction: null | ComponentType<ActionWithRulesProps>; removeRuleAction: null | ComponentType<ActionProps>; rule: ComponentType<RuleProps<string, string>>; ruleGroup: ComponentType<RuleGroupProps<F, O>>; ruleGroupBodyElements: ComponentType<RuleGroupProps<FullOption<string>, string> & { actions: QueryActions; combinator: string; context: any; disabled: boolean; dragMonitorId: string | symbol; dragRef: Ref<HTMLSpanElement>; dropEffect: DropEffect; dropMonitorId: string | symbol; dropRef: Ref<HTMLDivElement>; id: string; isDragging: boolean; isOver: boolean; not: boolean; parentDisabled: boolean; path: Path; previewRef: Ref<HTMLDivElement>; rules: RuleOrGroupArray; schema: Schema<FullOption<string>, string>; shiftDownDisabled: boolean; shiftUpDisabled: boolean; translations: Translations; } & { accessibleDescription: string; addGroup: ActionElementEventHandler; addRule: ActionElementEventHandler; classNames: Pick<{ actionElement: string; addGroup: string; addRule: string; betweenRules: string; body: string; branches: string; cloneGroup: string; cloneRule: string; combinators: string; disabled: string; dndCopy: string; dndDragging: string; dndOver: string; dragHandle: string; fields: string; header: string; invalid: string; lockGroup: string; lockRule: string; notToggle: string; operators: string; queryBuilder: string; removeGroup: string; removeRule: string; rule: string; ruleGroup: string; shiftActions: string; valid: string; value: string; valueListItem: string; valueSelector: string; valueSource: string; }, "removeGroup" | "addRule" | "addGroup" | "combinators" | "notToggle" | "dragHandle" | "lockGroup" | "shiftActions" | "body" | "header" | "cloneGroup">; cloneGroup: ActionElementEventHandler; onCombinatorChange: ValueChangeEventHandler; onGroupAdd: (group: RuleGroupTypeAny, parentPath: Path, context?: any) => void; onIndependentCombinatorChange: (value: any, index: number, context?: any) => void; onNotToggleChange: (checked: boolean, context?: any) => void; outerClassName: string; pathsMemo: { disabled: boolean; path: Path; }[]; removeGroup: ActionElementEventHandler; ruleGroup: RuleGroupType<RuleType<string, string, any, string>, string> | RuleGroupTypeIC<RuleType<string, string, any, string>, string>; shiftGroupDown: (event?: MouseEvent<Element, MouseEvent>, context?: any) => void; shiftGroupUp: (event?: MouseEvent<Element, MouseEvent>, context?: any) => void; toggleLockGroup: ActionElementEventHandler; validationClassName: string; validationResult: boolean | ValidationResult; }>; ruleGroupHeaderElements: ComponentType<RuleGroupProps<FullOption<string>, string> & { actions: QueryActions; combinator: string; context: any; disabled: boolean; dragMonitorId: string | symbol; dragRef: Ref<HTMLSpanElement>; dropEffect: DropEffect; dropMonitorId: string | symbol; dropRef: Ref<HTMLDivElement>; id: string; isDragging: boolean; isOver: boolean; not: boolean; parentDisabled: boolean; path: Path; previewRef: Ref<HTMLDivElement>; rules: RuleOrGroupArray; schema: Schema<FullOption<string>, string>; shiftDownDisabled: boolean; shiftUpDisabled: boolean; translations: Translations; } & { accessibleDescription: string; addGroup: ActionElementEventHandler; addRule: ActionElementEventHandler; classNames: Pick<{ actionElement: string; addGroup: string; addRule: string; betweenRules: string; body: string; branches: string; cloneGroup: string; cloneRule: string; combinators: string; disabled: string; dndCopy: string; dndDragging: string; dndOver: string; dragHandle: string; fields: string; header: string; invalid: string; lockGroup: string; lockRule: string; notToggle: string; operators: string; queryBuilder: string; removeGroup: string; removeRule: string; rule: string; ruleGroup: string; shiftActions: string; valid: string; value: string; valueListItem: string; valueSelector: string; valueSource: string; }, "removeGroup" | "addRule" | "addGroup" | "combinators" | "notToggle" | "dragHandle" | "lockGroup" | "shiftActions" | "body" | "header" | "cloneGroup">; cloneGroup: ActionElementEventHandler; onCombinatorChange: ValueChangeEventHandler; onGroupAdd: (group: RuleGroupTypeAny, parentPath: Path, context?: any) => void; onIndependentCombinatorChange: (value: any, index: number, context?: any) => void; onNotToggleChange: (checked: boolean, context?: any) => void; outerClassName: string; pathsMemo: { disabled: boolean; path: Path; }[]; removeGroup: ActionElementEventHandler; ruleGroup: RuleGroupType<RuleType<string, string, any, string>, string> | RuleGroupTypeIC<RuleType<string, string, any, string>, string>; shiftGroupDown: (event?: MouseEvent<Element, MouseEvent>, context?: any) => void; shiftGroupUp: (event?: MouseEvent<Element, MouseEvent>, context?: any) => void; toggleLockGroup: ActionElementEventHandler; validationClassName: string; validationResult: boolean | ValidationResult; }>; shiftActions: null | ComponentType<ShiftActionsProps>; valueEditor: null | ComponentType<ValueEditorProps<F, O>>; valueSelector: ComponentType<ValueSelectorProps<FullOption<string>>>; valueSourceSelector: null | ComponentType<ValueSourceSelectorProps>; }>, "notToggle" | "dragHandle" | "valueSourceSelector" | "ruleGroup" | "rule" | "shiftActions" | "actionElement" | "addGroupAction" | "addRuleAction" | "cloneGroupAction" | "cloneRuleAction" | "combinatorSelector" | "fieldSelector" | "inlineCombinator" | "lockGroupAction" | "lockRuleAction" | "operatorSelector" | "removeGroupAction" | "removeRuleAction" | "ruleGroupBodyElements" | "ruleGroupHeaderElements" | "valueEditor" | "valueSelector">>

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:351


disabledPaths

disabledPaths: Path[]

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:378


enableDragAndDrop

enableDragAndDrop: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:373


fieldMap

fieldMap: Partial<Record<GetOptionIdentifierType<F>, F>>

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:348


fields

fields: FullOptionList<F>

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:347


independentCombinators

independentCombinators: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:375


listsAsArrays

listsAsArrays: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:376


parseNumbers

parseNumbers: ParseNumbersPropConfig

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:377


qbId

qbId: string

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:346


showCloneButtons

showCloneButtons: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:368


showCombinatorsBetweenRules

showCombinatorsBetweenRules: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:365


showLockButtons

showLockButtons: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:369


showNotToggle

showNotToggle: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:366


showShiftActions

showShiftActions: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:367


suppressStandardClassnames

suppressStandardClassnames: boolean

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:379


validationMap

validationMap: ValidationMap

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:374

Methods

createRule()

createRule(): RuleType<string, string, any, string>

Returns

RuleType<string, string, any, string>

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:352


createRuleGroup()

createRuleGroup(ic?: boolean): RuleGroupTypeAny

Parameters

ParameterType
ic?boolean

Returns

RuleGroupTypeAny

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:353


dispatchQuery()

dispatchQuery(query: RuleGroupTypeAny): void

Parameters

ParameterType
queryRuleGroupTypeAny

Returns

void

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:354


getInputType()

getInputType(field: string, operator: string, meta: { fieldData: F; }): null | InputType

Parameters

ParameterType
fieldstring
operatorstring
meta{ fieldData: F; }
meta.fieldDataF

Returns

null | InputType

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:360


getOperators()

getOperators(field: string, meta: { fieldData: F; }): FullOperator<string>[] | OptionGroup<FullOperator<string>>[]

Parameters

ParameterType
fieldstring
meta{ fieldData: F; }
meta.fieldDataF

Returns

FullOperator<string>[] | OptionGroup<FullOperator<string>>[]

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:356


getQuery()

getQuery(): undefined | RuleGroupTypeAny

Returns

undefined | RuleGroupTypeAny

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:355


getRuleClassname()

getRuleClassname(rule: RuleType<string, string, any, string>, misc: { fieldData: F; }): Classname

Parameters

ParameterType
ruleRuleType<string, string, any, string>
misc{ fieldData: F; }
misc.fieldDataF

Returns

Classname

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:362


getRuleGroupClassname()

getRuleGroupClassname(ruleGroup: RuleGroupTypeAny): Classname

Parameters

ParameterType
ruleGroupRuleGroupTypeAny

Returns

Classname

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:363


getValueEditorSeparator()

getValueEditorSeparator(field: string, operator: string, meta: { fieldData: F; }): ReactNode

Parameters

ParameterType
fieldstring
operatorstring
meta{ fieldData: F; }
meta.fieldDataF

Returns

ReactNode

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:358


getValueEditorType()

getValueEditorType(field: string, operator: string, meta: { fieldData: F; }): ValueEditorType

Parameters

ParameterType
fieldstring
operatorstring
meta{ fieldData: F; }
meta.fieldDataF

Returns

ValueEditorType

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:357


getValues()

getValues(field: string, operator: string, meta: { fieldData: F; }): WithUnknownIndex<Option<string> & FullOption<string>>[] | OptionGroup<WithUnknownIndex<Option<string> & FullOption<string>>>[]

Parameters

ParameterType
fieldstring
operatorstring
meta{ fieldData: F; }
meta.fieldDataF

Returns

WithUnknownIndex<Option<string> & FullOption<string>>[] | OptionGroup<WithUnknownIndex<Option<string> & FullOption<string>>>[]

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:361


getValueSources()

getValueSources(field: string, operator: string, meta: { fieldData: F; }): ValueSources

Parameters

ParameterType
fieldstring
operatorstring
meta{ fieldData: F; }
meta.fieldDataF

Returns

ValueSources

Defined in

packages/react-querybuilder/src/types/propsUsingReact.ts:359


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.