guillotinaweb / ngx-schema-form

HTML form generation based on JSON Schema
MIT License
485 stars 174 forks source link

Fix for #431 #442

Closed KBroichhausen closed 2 years ago

KBroichhausen commented 2 years ago

This is a fix for the issue #431 .

Because value can be the number 0 it will not correctly evaluate the expression and always returns false for the visibleIf because !!value for 0 is always false.

With this patch the value needs to be defined by checking !!value or it needs to be the number 0.

ebrehault commented 2 years ago

Thank you @KBroichhausen for your 3 contributions! They are merged and are published in version 2.7.2. (FYI, as I am about to publish 2.8.0 for Angular 14 compliancy, I preferred to publish your fixes before, as you might still be using Angular 13)