I'm trying to do a DropDownList with an enum.
I have the enum defined like this :
export enum Permisos {
Inactive = 'Inactive',
Active = 'Active',
Closed = 'Closed',
Canceled = 'Cancelled',
Suspended = 'Suspended',
Archived = 'Archived'
}, then an entity that has an Enum property:
export interface Portfolio {
id: string; // UUid
name: string; // varchar(255),
permisos: Permisos ; // ENUM type Permisos
....
Now I create a dropdown instance like this:
new ex.dropdowns.DropDownList({
value: args.rowData.permisos,
popupHeight: '300px',
floatLabelType: 'Always',
dataSource: Object.values(Permisos),
fields: { text: 'Item1', value: 'Item1' },
placeholder: 'Permisos'
}, args.form.elements.namedItem('permisos') as HTMLInputElement);
But I get this error:
Thanks