I have an ENUM field with a type: DataTypes.ENUM(-1, 0, 1, 2) let’s call it myEnum.
When a record is updated : typeof record.myEnum is string if I update myEnum typeof record.myEnum is number if I update an other field
ENUM field custom conditional formatting is not working
I have a custom conditionnal formatting on myEnum with altered values. The values are not altered so the conditional formatting is not working.
I’ve just checked on my side with forest-express-sequelize@9, I was not able to reproduce your issue.
My enum field is well sent as a number when I update it (and it should not be sent if other fields are updated but not this one!) and the alter value feature is working well.
So we need to dig a bit more to found out where is your issue.
Could you please:
Tell me how you defined your enum field in your DB
Tell me what edit widget did you choose
Show me the payload that is sent when you say it’s sent as a string
I’ve retried today, and strangely I was able to reproduce your problem.
It seems that we are not dealing well with this Enum of numbers.
Let me check why and if we can fix this.
In the meantime, I guess a workaround could be to define your field like this DataTypes.INTEGER. The alter values should work fine in the display widget settings, and you could use the dropdown you wanted in the edit widget (to limit what values could be entered).