UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

11 lines (10 loc) 532 B
// Transform options to the desired shape for the options of the Select component export function transformItems(items, intl) { return items.map(item => { const { code, name, isValid } = item; return { value: code, label: intl.formatMessage({ id: "sjnifH", defaultMessage: [{ type: 1, value: "name" }, { type: 5, value: "isValid", options: { true: { value: [] }, other: { value: [{ type: 0, value: " (no longer valid)" }] } } }] }, { name: name, isValid: isValid }), }; }); }