i've noticed that properties having default value set to "false" are considered as having a value when they are tested with "if" (ie : if ($this->property('useMainCategory')))
But value is set to zero when property checkbox is checked twice, once for checking, once for unchecking ; and then testing with "if" reacts as expected.
i've just tested to add Records component (as a snippet) to content field of a Staticpage, the initial code is :
<figure data-component="\JanVince\SmallRecords\Components\Records" data-inspector-id="inspectorid-310544570422" data-property-activeonly="true" data-property-allowlimit="false" data-property-areaslug="parutions-presse" data-property-categoryslug="{{ :category }}" data-property-favouriteonly="false" data-property-limit="10" data-property-orderascollection="false" data-property-orderby="name" data-property-orderbydirection="ASC" data-property-pageslug="{{ :page }}" data-property-recordpage="false" data-property-recordpageslug="{{ :record }}" data-property-tagslug="{{ :tag }}" data-property-usemaincategory="false" data-property-usemulticategories="0" data-snippet="records"> </figure>
Nothing is displayed.
Then i replace "false" by "0" :
<figure data-component="\JanVince\SmallRecords\Components\Records" data-inspector-id="inspectorid-310544570422" data-property-activeonly="true" data-property-allowlimit="0" data-property-areaslug="parutions-presse" data-property-categoryslug="{{ :category }}" data-property-favouriteonly="0" data-property-limit="10" data-property-orderascollection="0" data-property-orderby="name" data-property-orderbydirection="ASC" data-property-pageslug="{{ :page }}" data-property-recordpage="0" data-property-recordpageslug="{{ :record }}" data-property-tagslug="{{ :tag }}" data-property-usemaincategory="0" data-property-usemulticategories="0" data-snippet="records"> </figure>
and my records show up
i feel (an do not understand why) taht "false" is considered as a string instead of a boolean