GeoLeaf Core API - v3.0.0
    Preparing search index...
    AttributeEdit:
        | { required?: boolean; widget?: undefined; options?: undefined }
        | {
            [E in AttributeCaptureWidget]: {
                required?: boolean;
                widget: E;
                options?: AttributeWidgetOptions[E];
            }
        }[AttributeCaptureWidget]

    The capture projection of a field.

    Declaring edit on any field of a layer is what obliges that layer to declare both its editability and its write target — a schema-level rule, not a property of this object.

    ⚠️ It carried required ALONE until task 7.2, and that made it a stunted twin of AttributeDisplay, which has overridden its presentation since Sprint 2. The measurement that reopened it: AttributeWidgetOptions is indexed BY WIDGET, so one widget slot admits exactly one typed options bag. BadgeOptions is {placeholder?} and has nowhere to hold a choice list; DropdownOptions carries options. Two projections needing two widgets therefore need two pairs — deriving the capture widget from the display one by a hard-coded table could not have supplied sites_rosario.statut's three choices at all.

    Both members are OVERRIDES: absent, the capture reuses the field-level pair. That is the case for 10 of the 11 fields migrated at 7.2, which is why they are optional.

    The two forms are disjoint on purpose — options without widget would be typed by the READING widget, that is, by something other than what it configures. The JSON schema states the same thing as dependencies: { options: ["widget"] }.

    Type Declaration

    • { required?: boolean; widget?: undefined; options?: undefined }
      • Optional Readonlyrequired?: boolean

        When true, the capture form refuses an empty value.

      • Optional Readonlywidget?: undefined
      • Optional Readonlyoptions?: undefined
    • {
          [E in AttributeCaptureWidget]: {
              required?: boolean;
              widget: E;
              options?: AttributeWidgetOptions[E];
          }
      }[AttributeCaptureWidget]