RulesEngineProps
Defined in: rules-engine/src/types/props.ts:184
Props for RulesEngineBuilder.
Properties
addConsequentToNewConditions?
optionaladdConsequentToNewConditions?:boolean
Defined in: rules-engine/src/types/props.ts:224
When true, newly added conditions are seeded with a consequent using the default
consequent type for that condition.
allowDefaultConsequents?
optionalallowDefaultConsequents?:boolean
Defined in: rules-engine/src/types/props.ts:217
allowNestedConditions?
optionalallowNestedConditions?:boolean
Defined in: rules-engine/src/types/props.ts:218
autoSelectConsequentType?
optionalautoSelectConsequentType?:boolean
Defined in: rules-engine/src/types/props.ts:215
classnames?
optionalclassnames?:Partial<ClassnamesRE>
Defined in: rules-engine/src/types/props.ts:228
components?
optionalcomponents?:Partial<ComponentsRE>
Defined in: rules-engine/src/types/props.ts:227
consequentTypes?
optionalconsequentTypes?:FlexibleOptionList<{[key:string]:unknown;disabled?:boolean;label:string;name:string;properties?:ConsequentPropertyDef[];value?:string; }>
Defined in: rules-engine/src/types/props.ts:188
defaultRulesEngine?
optionaldefaultRulesEngine?:RulesEngine<RuleType<string,string,any,string,Record<string,any>>,string>
Defined in: rules-engine/src/types/props.ts:186
enableMountRulesEngineChange?
optionalenableMountRulesEngineChange?:boolean
Defined in: rules-engine/src/types/props.ts:225
getConsequentTypes?
optionalgetConsequentTypes?: (conditionPath:Path,antecedent:RuleGroupTypeAny,context?:unknown) =>FlexibleOptionListProp<{[key:string]:unknown;disabled?:boolean;label:string;name:string;properties?:ConsequentPropertyDef[];value?:string; }> |null
Defined in: rules-engine/src/types/props.ts:189
Parameters
| Parameter | Type |
|---|---|
conditionPath | Path |
antecedent | RuleGroupTypeAny |
context? | unknown |
Returns
FlexibleOptionListProp<{[key: string]: unknown; disabled?: boolean; label: string; name: string; properties?: ConsequentPropertyDef[]; value?: string; }> | null
idGenerator?
optionalidGenerator?: () =>string
Defined in: rules-engine/src/types/props.ts:239
id generator function. Should always produce a unique/random string.
Returns
string
Default
crypto.randomUUID
onAddCondition?
optionalonAddCondition?: (condition:REConditionAny,parentConditionPath:Path,rulesEngine:RulesEngineAny) =>boolean|REConditionAny
Defined in: rules-engine/src/types/props.ts:194
Parameters
| Parameter | Type |
|---|---|
condition | REConditionAny |
parentConditionPath | Path |
rulesEngine | RulesEngineAny |
Returns
boolean | REConditionAny
onMoveCondition?
optionalonMoveCondition?: (condition:REConditionAny,fromPath:Path,direction:"up"|"down",rulesEngine:RulesEngineAny,nextRulesEngine:RulesEngineAny) =>boolean|RulesEngineAny
Defined in: rules-engine/src/types/props.ts:208
This callback is invoked before a condition is shifted up or down. Return true to allow
the shift, false to cancel it, or a new rules engine object which will become the new state.
Parameters
| Parameter | Type |
|---|---|
condition | REConditionAny |
fromPath | Path |
direction | "up" | "down" |
rulesEngine | RulesEngineAny |
nextRulesEngine | RulesEngineAny |
Returns
boolean | RulesEngineAny
onRemoveCondition?
optionalonRemoveCondition?: (condition:REConditionAny,conditionPath:Path,rulesEngine:RulesEngineAny) =>boolean|REConditionAny
Defined in: rules-engine/src/types/props.ts:199
Parameters
| Parameter | Type |
|---|---|
condition | REConditionAny |
conditionPath | Path |
rulesEngine | RulesEngineAny |
Returns
boolean | REConditionAny
onRulesEngineChange?
optionalonRulesEngineChange?: (re:RulesEngine) =>void
Defined in: rules-engine/src/types/props.ts:187
Parameters
| Parameter | Type |
|---|---|
re | RulesEngine |
Returns
void
queryBuilderProps?
optionalqueryBuilderProps?:Except<QueryBuilderProps<RuleGroupTypeAny, {[key:string]:unknown;disabled?:boolean;label:string;name:string;value:string; }, {[key:string]:unknown;disabled?:boolean;label:string;name:string;value:string; }, {[key:string]:unknown;disabled?:boolean;label:string;name:string;value:string; }>,"query"|"onQueryChange">
Defined in: rules-engine/src/types/props.ts:230
rulesEngine?
optionalrulesEngine?:RulesEngine<RuleType<string,string,any,string,Record<string,any>>,string>
Defined in: rules-engine/src/types/props.ts:185
showBranches?
optionalshowBranches?:boolean
Defined in: rules-engine/src/types/props.ts:226
showShiftActions?
optionalshowShiftActions?:boolean
Defined in: rules-engine/src/types/props.ts:219
suppressStandardClassnames?
optionalsuppressStandardClassnames?:boolean
Defined in: rules-engine/src/types/props.ts:216
translations?
optionaltranslations?:Partial<TranslationsRE>
Defined in: rules-engine/src/types/props.ts:229
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.