ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Type Alias ColumnDrawerConfig

    ColumnDrawerConfig:
        | {
            label: string;
            widget: "autocompleteStrings";
            options: readonly string[];
            optionLabels?: Readonly<Record<string, string>>;
            emptyHelperText: string;
            placeholder?: string;
            bind: ColumnDrawerBinding;
        }
        | {
            label: string;
            widget: "autocompleteObjects";
            options: ReadonlyArray<{ code: string; label: string }>;
            emptyHelperText: string;
            placeholder?: string;
            bind: ColumnDrawerBinding;
        }
        | {
            label: string;
            widget: "chips";
            options: readonly string[];
            formatChipLabel?: (option: string) => string;
            bind: ColumnDrawerBinding;
        }
        | {
            label: string;
            widget: "numberRange";
            adornment?: "currency"
            | string & {};
            bind: ColumnDrawerBinding;
        }

    Column-meta payload describing how a column appears in the drawer accordion. Only columns with meta.drawer set are rendered there. The widget field picks the input component and must match the runtime type of options (e.g. "autocompleteObjects" needs { code: string; label: string }[]).

    The accordion's panelId is derived from the column id (search-${column.id}) — no need to repeat it per column.

    Type declaration

    • {
          label: string;
          widget: "autocompleteStrings";
          options: readonly string[];
          optionLabels?: Readonly<Record<string, string>>;
          emptyHelperText: string;
          placeholder?: string;
          bind: ColumnDrawerBinding;
      }
      • label: string
      • widget: "autocompleteStrings"
      • options: readonly string[]

        Strings rendered as the option list.

      • OptionaloptionLabels?: Readonly<Record<string, string>>

        Optional display map for option strings, e.g. supplier key → name.

      • emptyHelperText: string

        Italic helper text shown under empty input.

      • Optionalplaceholder?: string
      • bind: ColumnDrawerBinding
    • {
          label: string;
          widget: "autocompleteObjects";
          options: ReadonlyArray<{ code: string; label: string }>;
          emptyHelperText: string;
          placeholder?: string;
          bind: ColumnDrawerBinding;
      }
    • {
          label: string;
          widget: "chips";
          options: readonly string[];
          formatChipLabel?: (option: string) => string;
          bind: ColumnDrawerBinding;
      }
      • label: string
      • widget: "chips"
      • options: readonly string[]
      • OptionalformatChipLabel?: (option: string) => string

        Optional display transform (e.g. capitalize) for chip labels.

      • bind: ColumnDrawerBinding
    • {
          label: string;
          widget: "numberRange";
          adornment?: "currency" | string & {};
          bind: ColumnDrawerBinding;
      }
      • label: string
      • widget: "numberRange"
      • Optionaladornment?: "currency" | string & {}

        Optional start-adornment. Pass the literal string "currency" to resolve the symbol at render time from userSettings.currency (e.g. USD → "$", EUR → "€"). Any other string is used as-is.

      • bind: ColumnDrawerBinding