Retrieves a list of variants based on the given fields.

  • Parameters

    • fields: IField<any, any>[]

      The array of fields to process.

    • OptionalkeyToTitle: { ignore?: (key: string) => boolean; keyToTitle?: (v: string) => string }

      (Optional) A function to derive the title from the field name. Default is identity function.

    Returns { label: string; value: string }[]

    • The list of variants, each containing a label and value.