Search
Search
setCaseOrder
setCaseOrder
Set the order of the Enum Field's Enum Cases.
const alphabeticalCaseOrder = enumField.cases
.toSorted((a, b) => a.name.localeCompare(b.name))
.map(({ id }) => id)
await enumField.setCaseOrder(alphabeticalCaseOrder)
Parameters
caseIds: string[]
– An array of the IDs of all Enum Cases, in the desired new order.
Returns
Promise<void>