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

Metadata Field Type

Will be translated to a multi column table.

import {
  UltimateEntityFieldTypes,
  UltimateEntityField,
} from "medusa-plugin-ultimate/dist/index";
@UltimateEntityField({
    // required
    type: UltimateEntityFieldTypes.METADATA,
    columns: { name: string; placeholder?: string; defaultValue?: string }[];
    // options
    defaultValue?: string;
    name?: string;
    description?: string;
    note?: string;
    group?: string;
})
@Column({ type: "jsonb" })
// TODO: replace "any" with correct type
metadata: any;

Parameters

  • type: UltimateEntityFieldTypes.BOOLEAN,
  • columns: array of columns for the matadata, be default there is only one.
  • 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

  • Product Metadata
  • Table

Illustrative Images

Illustration