Pathfinder 1e for Foundry VTT
    Preparing search index...

    Class TraitSelector

    A specialized form used to select types.

    Hierarchy (View Summary)

    • HandlebarsApplication<this> & DocumentSheetV2<
          any,
          RenderContext<any>,
          Configuration<any>,
          RenderOptions,
          this,
      >
    Index

    Constructors

    • Parameters

      • options: any

      Returns TraitSelector

    Properties

    _collator: Collator = pf1.utils.i18n.sortCollator

    Collator for sorting

    document: ActorPF | ItemPF
    trait: any

    Currently stored values

    DEFAULT_OPTIONS: {
        actions: { deleteCustom: Object };
        classes: string[];
        form: { closeOnSubmit: boolean; handler: Object; submitOnChange: boolean };
        id: string;
        position: { width: number };
        sheetConfig: boolean;
        tag: string;
        window: { icon: string; minimizable: boolean; resizable: boolean };
    } = ...
    PARTS: { form: { scrollable: string[]; template: string } } = ...
    SEARCH_INCLUDE_ID: boolean = true

    Include language agnostic ID in search.

    Accessors

    • get path(): string

      Data path to the trait

      Returns string

    • get promise(): Promise<any>

      Returns Promise<any>

    • get title(): string

      Configure the title of the trait selector window

      Returns string

    Methods

    • Returns void

    • Parameters

      • options: any

      Returns any

    • Internal

      Mark Choices from other sources

      Returns void

    • Internal

      The event handler for active keystrokes on the input field.

      Parameters

      • event: Event

        The originating keydown event

      Returns void

    • Protected

      Parameters

      • formConfig: object
      • event: Event

      Returns void

    • Parameters

      • options: any

      Returns void

    • Internal

      The event handler for custom field input.

      Parameters

      • event: Event

        The originating input event

      Returns void

    • Protected

      Attach event listeners to the rendered application form.

      Parameters

      • context: ApplicationRenderContext

        Prepared context data

      • options: RenderOptions

        Provided render options

      Returns void

    • Parameters

      • options: any

      Returns Promise<void>

    • Protected

      Parameters

      • partId: any

      Returns Promise<
          | undefined
          | {
              choices: any;
              cssClass: string;
              custom: any[];
              editable: boolean;
              hasCustom: any;
              hideSearch: boolean;
              search: string;
          },
      >

    • Split a given value based on the configured separator

      Parameters

      • value: string

        The value to split

      Returns string[]

      The split values, with empty values filtered out