📙 For any Help, Contact me on Discord (@raideno).

Select Field Type

Ideal for multiple options of predefined values, will be translated to an html select.

import {
  UltimateEntityFieldTypes,
  UltimateEntityField,
} from "medusa-plugin-ultimate/dist/index";
@UltimateEntityField({
    // required
    type: UltimateEntityFieldTypes.SELECT,
    options: { value: string; label: string; description: string; }[];
    // options
    name?: string;
    description?: string;
    note?: string;
    group?: string;
})
@Column({ type: "varchar" })
description: string;

Parameters

  • type: UltimateEntityFieldTypes.SELECT,
  • options: list of available options.
  • defaultValue: (optional)
  • name: (optional) override field name, will be displayed on the UI as a label.
  • description: (optional) to give more details about the field, will be displayed on the UI below the input.
  • note: (optional) displayed as a tooltip when the infos icon is hovered.
  • group: (optional) fields of the same group are displayed in the same block (details).

Example Use Cases

This field can be used for multiple things

  • Select Options from an enum

Illustrative Images

Illustration