useQueryBuilder()
useQueryBuilder<
RG
,F
,O
,C
>(props
):object
Type Parameters
Type Parameter |
---|
RG extends RuleGroupTypeAny |
F extends FullField <string , string , string , Option <string >, Option <string >> |
O extends FullOperator <string > |
C extends FullCombinator <string > |
Parameters
Parameter | Type |
---|---|
props | QueryBuilderProps <RG , F , O , C > |
Returns
object
actions
actions:
QueryActions
combinatorPropObject
combinatorPropObject:
Pick
<RuleGroupProps
<FullOption
<string
>,string
>,"combinator"
>
dndEnabledAttr
dndEnabledAttr:
string
inlineCombinatorsAttr
inlineCombinatorsAttr:
string
queryDisabled
queryDisabled:
boolean
rootGroup
rootGroup:
RuleGroupTypeAny
<GetRuleTypeFromGroupWithFieldAndOperator
<RG
,F
,O
>>
rootGroupDisabled
rootGroupDisabled:
boolean
rqbContext
rqbContext:
object
rqbContext.controlClassnames
rqbContext.controlClassnames:
Partial
<Classnames
> &Classnames
This can be used to assign specific CSS classes to various controls that are rendered by QueryBuilder.
rqbContext.controlElements
rqbContext.controlElements:
Partial
<object
> &Required
<SetNonNullable
<Partial
<object
>,"ruleGroup"
|"rule"
|"shiftActions"
|"actionElement"
|"addGroupAction"
|"addRuleAction"
|"cloneGroupAction"
|"cloneRuleAction"
|"combinatorSelector"
|"dragHandle"
|"fieldSelector"
|"inlineCombinator"
|"lockGroupAction"
|"lockRuleAction"
|"notToggle"
|"operatorSelector"
|"removeGroupAction"
|"removeRuleAction"
|"ruleGroupBodyElements"
|"ruleGroupHeaderElements"
|"valueEditor"
|"valueSelector"
|"valueSourceSelector"
>>
Defines replacement components.
rqbContext.debugMode
rqbContext.debugMode:
boolean
Enables debug logging for QueryBuilder (and React DnD when applicable).
Default
false
rqbContext.enableDragAndDrop
rqbContext.enableDragAndDrop:
boolean
Enables drag-and-drop features.
Default
false
rqbContext.enableMountQueryChange
rqbContext.enableMountQueryChange:
boolean
Set to false
to avoid calling the onQueryChange
callback
when the component mounts.
Default
true
rqbContext.initialQuery
rqbContext.initialQuery:
RuleGroupType
<GetRuleTypeFromGroupWithFieldAndOperator
<RG
,F
,O
>,string
> |RuleGroupTypeIC
<GetRuleTypeFromGroupWithFieldAndOperator
<RG
,F
,O
>,string
>
rqbContext.qbId?
optional
rqbContext.qbId:string
rqbContext.translations
rqbContext.translations:
Partial
<Translations
> &TranslationsFull
This can be used to override translatable texts applied to the various controls that are rendered by QueryBuilder.
schema
schema:
Schema
<F
,GetOptionIdentifierType
<O
>>
translations
translations:
Partial
<Translations
> &TranslationsFull
wrapperClassName
wrapperClassName:
string
Defined in
packages/react-querybuilder/src/hooks/useQueryBuilder.ts:11
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.