useQueryBuilderSetup()
useQueryBuilderSetup<
RG
,F
,O
,C
>(props
):object
Massages the props as necessary and prepares the basic update/generate methods for use by the QueryBuilder component.
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
combinators
combinators:
WithUnknownIndex
<BaseOption
<string
> &FullOption
<string
>>[] |OptionGroup
<WithUnknownIndex
<BaseOption
<string
> &FullOption
<string
>>>[]
createRule()
createRule: () =>
GetRuleTypeFromGroupWithFieldAndOperator
<RG
,F
,O
>
Returns
GetRuleTypeFromGroupWithFieldAndOperator
<RG
, F
, O
>
createRuleGroup()
createRuleGroup: (
independentCombinators
?) =>RG
Parameters
Parameter | Type |
---|---|
independentCombinators ? | boolean |
Returns
RG
fieldMap
fieldMap:
FullOptionMap
<FullField
<string
,string
,string
,Option
<string
>,Option
<string
>>,GetOptionIdentifierType
<F
>>
fields
fields:
FullOptionList
<F
>
getInputTypeMain()
getInputTypeMain: (
field
,operator
,__namedParameters
) =>InputType
Parameters
Parameter | Type |
---|---|
field | GetOptionIdentifierType <F > |
operator | GetOptionIdentifierType <O > |
__namedParameters | object |
__namedParameters.fieldData | F |
Returns
getOperatorsMain()
getOperatorsMain: (
field
,__namedParameters
) =>FullOptionList
<O
>
Parameters
Parameter | Type |
---|---|
field | GetOptionIdentifierType <F > |
__namedParameters | object |
__namedParameters.fieldData | F |
Returns
getRuleDefaultOperator()
getRuleDefaultOperator: (
field
) =>GetOptionIdentifierType
<O
>
Parameters
Parameter | Type |
---|---|
field | GetOptionIdentifierType <F > |
Returns
getRuleDefaultValue()
getRuleDefaultValue: <
RT
>(r
) =>any
Type Parameters
Type Parameter | Default type |
---|---|
RT extends RuleType <string , string , any , string > | GetRuleTypeFromGroupWithFieldAndOperator <RG , F , O > |
Parameters
Parameter | Type |
---|---|
r | RT |
Returns
any
getValueEditorTypeMain()
getValueEditorTypeMain: (
field
,operator
,__namedParameters
) =>ValueEditorType
Parameters
Parameter | Type |
---|---|
field | GetOptionIdentifierType <F > |
operator | GetOptionIdentifierType <O > |
__namedParameters | object |
__namedParameters.fieldData | F |
Returns
getValueSourcesMain()
getValueSourcesMain: (
field
,operator
) =>ValueSources
Parameters
Parameter | Type |
---|---|
field | GetOptionIdentifierType <F > |
operator | GetOptionIdentifierType <O > |
Returns
getValuesMain()
getValuesMain: (
field
,operator
,__namedParameters
) =>WithUnknownIndex
<BaseOption
<string
> &FullOption
<string
>>[] |OptionGroup
<WithUnknownIndex
<BaseOption
<string
> &FullOption
<string
>>>[]
Parameters
Parameter | Type |
---|---|
field | GetOptionIdentifierType <F > |
operator | GetOptionIdentifierType <O > |
__namedParameters | object |
__namedParameters.fieldData | F |
Returns
WithUnknownIndex
<BaseOption
<string
> & FullOption
<string
>>[] | OptionGroup
<WithUnknownIndex
<BaseOption
<string
> & FullOption
<string
>>>[]
qbId
qbId:
string
rqbContext
rqbContext:
UseMergedContextReturn
<F
,GetOptionIdentifierType
<O
>>
Defined in
packages/react-querybuilder/src/hooks/useQueryBuilderSetup.ts:56
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.