Bug report: custom component bool type properties

FYI, team, when I give a custom component a new property with type boolean, the default value checkbox is unchecked, but the value passed to the constructor is actually None when I run the app. If I go back into the “use as component” modal, and first check, then un-check the box, the passed value is False when I run the app.

It obviously hasn’t been a big issue, but it’s still unexpected behavior from the IDE.

1 Like

I concur

Example below:
https://anvil.works/build#clone:HQW45QTETPIT7OQX=LV4LX4HDDPKTR73CGNX5LGQ5

Booleans being None on creation was discussed a while back :

I think it’s wrong, especially when the IDE shows it as unchecked which, not unreasonably, could be assumed to be False.

1 Like

This might be related to another similar bug I reported long time ago: Impossible to set custom component properties with default value to empty string