View Source GrowthBook.ParentCondition (GrowthBook v0.3.0)
A ParentCondition defines a prerequisite.
Instead of evaluating against attributes, the condition evaluates against the returned value of the parent feature. The condition will always reference a "value" property. Here is an example of a gating prerequisite where the parent feature must be toggled on:
%ParentCondition{
id: "parent-feature",
condition: %{
"value": {
"$exists": true
}
},
gate: true
}
Link to this section Summary
Link to this section Types
Specs
Specs
t() :: %GrowthBook.ParentCondition{
condition: GrowthBook.Condition.t(),
gate: boolean(),
id: String.t()
}
ParentCondition
A ParentCondition consists of a parent feature's id (string), a condition (Condition), and an optional gate (boolean) flag.
id(String.t/0) - parent feature's idcondition(GrowthBook.Condition.t/0) - conditiongate(boolean/0) - If gate is true, then this is a blocking feature-level prerequisite; otherwise it applies to the current rule only.
Link to this section Functions
Specs
eval(GrowthBook.Context.t(), [t()] | nil, [String.t()]) :: true | false | {:error, error()}