Skip to content

Commit

Permalink
Merge pull request #328 from AviFix/Bug#327
Browse files Browse the repository at this point in the history
Bug#327
  • Loading branch information
ebrehault committed Apr 9, 2020
2 parents 83b745c + 3354abd commit 3878a17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 2.5.1 (2020-03-22)
# 2.5.2 (2020-04-09)

- Fix: visibleIf returns turn even if only part of the value matches the expression

#2.5.1 (2020-03-22)

- Allow "VisibleIf" to work with numeric values

Expand Down
2 changes: 1 addition & 1 deletion projects/schema-form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-schema-form",
"version": "2.5.1",
"version": "2.5.2",
"repository": {
"type": "git",
"url": "git+https://github.com/guillotinaweb/ngx-schema-form"
Expand Down
3 changes: 2 additions & 1 deletion projects/schema-form/src/lib/model/formproperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ export abstract class FormProperty {
}
}
} else {
valid = isNaN(value) ? value.indexOf(expression) !== -1 : value === expression;
valid = !!value ? expression.toString() === value : false;

}
return valid
} catch (error) {
Expand Down

0 comments on commit 3878a17

Please sign in to comment.