SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js
https://adminjs.co
MIT License
8.15k stars 659 forks source link

[Bug]: Checkbox value is not sent unless touched #1559

Open lpbonomi opened 12 months ago

lpbonomi commented 12 months ago

Contact Details

No response

What happened?

Checkboxes have boolean values and therefore you expect that if it not checked (the default value) it will send the value false. However, if you don't touch the field the attribute is not sent in the form and this uses the default value or throws an error in case it doesn't have one.

Screenshot 2023-09-11 at 09 28 39

Screenshot 2023-09-11 at 09 29 02

Bug prevalence

Always

AdminJS dependencies version

"@adminjs/express": "^6.0.0",
"@adminjs/prisma": "^5.0.1",
"adminjs": "^7.2.1",

What browsers do you see the problem on?

No response

Relevant log output

No response

Relevant code that's giving you issues

No response