Body, Mind & Soul — API Reference
    Preparing search index...

    Function handleSubConditionFieldChange

    • Handle inline field changes for sub-conditions (type, logicOp) and meta-condition range values (metaRange). Rewrites the full subConditions array since it's a plain ArrayField.

      The collection argument names the document field the owning trigger lives in ("triggers" by default). Keyword Event Triggers live in system.eventTriggers, so their sub-condition and range edits must pass "eventTriggers" or the update is written to a trigger that does not exist there. The swing-scoped metaRange branch (used when dataset.swingIndex is set) ignores collection and keeps its own system.swings.<id>.<triggersKey> routing.

      Parameters

      • sheet: object

        The sheet whose document receives the update (must expose document.update and document.system).

      • dataset: DOMStringMap

        The changed element's dataset. Must carry triggerId, conditionId and field (subConditionType | subConditionLogic | metaRange). subConditionIndex is required for the sub-condition fields; swingIndex and triggersKey select the swing-scoped branch of metaRange.

      • value: any

        The new value for the field (type/logic string, or a numeric-coercible string for metaRange).

      • Optionalcollection: string = "triggers"

        Trigger collection on system the trigger lives in ("triggers" or "eventTriggers").

      Returns boolean

      true when an update was issued; false when the condition was not found, the field is unknown, or a swing-scoped swing id could not be resolved.

      // Keyword Event Trigger meta-condition sub-filter type change
      handleSubConditionFieldChange(this, target.dataset, target.value, "eventTriggers");