Skip to main content

QueryBuilderProps<RG, F, O, C>

QueryBuilderProps<RG, F, O, C>: RG extends RuleGroupType<infer R> | RuleGroupTypeIC<infer R> ? QueryBuilderContextProps<F, GetOptionIdentifierType<O>> & { accessibleDescriptionGenerator: AccessibleDescriptionGenerator; addRuleToNewGroups: boolean; autoSelectField: boolean; autoSelectOperator: boolean; baseCombinator: Record<string, unknown>; baseField: Record<string, unknown>; baseOperator: Record<string, unknown>; combinators: FlexibleOptionList<C>; context: any; defaultQuery: RG; disabled: boolean | Path[]; fields: FlexibleOptionList<F> | BaseOptionMap<F, GetOptionIdentifierType<F>>; getDefaultField: GetOptionIdentifierType<F> | (fieldsData: FullOptionList<F>) => string; getDefaultOperator: GetOptionIdentifierType<O> | (field: GetOptionIdentifierType<F>, misc: { fieldData: F; }) => string; idGenerator: () => string; independentCombinators: boolean; listsAsArrays: boolean; operators: FlexibleOptionList<O>; parseNumbers: ParseNumbersPropConfig; query: RG; resetOnFieldChange: boolean; resetOnOperatorChange: boolean; showCloneButtons: boolean; showCombinatorsBetweenRules: boolean; showLockButtons: boolean; showNotToggle: boolean; showShiftActions: boolean; suppressStandardClassnames: boolean; validator: QueryValidator; getDefaultValue: any; getInputType: null | InputType; getOperators: null | FlexibleOptionList<FullOperator<string>>; getRuleClassname: Classname; getRuleGroupClassname: Classname; getValueEditorSeparator: ReactNode; getValueEditorType: ValueEditorType; getValues: FlexibleOptionList<{ [key: string]: unknown; disabled: boolean; label: string; name: N; value: N; }>; getValueSources: ValueSources; onAddGroup: boolean | RG<RG>; onAddRule: boolean | RuleType<string, string, any, string>; onLog: void; onMoveGroup: boolean | RG<RG>; onMoveRule: boolean | RG<RG>; onQueryChange: void; onRemove: boolean; } : never

Defined in: packages/react-querybuilder/src/types/propsUsingReact.ts:536

Props for QueryBuilder.

Notes:

  • Only one of query or defaultQuery should be provided. If query is present, then defaultQuery should be undefined and vice versa.
  • If rendered initially with a query prop, then query must be defined in every subsequent render or warnings will be logged (in non-production modes only).

Type Parameters

Type ParameterDescription
RG extends RuleGroupTypeAnyThe type of the query object, inferred from either the query or defaultQuery prop. Must extend RuleGroupType or RuleGroupTypeIC.
F extends FullFieldThe field type (see Field).
O extends FullOperatorThe operator type (see Operator).
C extends FullCombinatorThe combinator type (see Combinator).

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.