Skip to content

Commit 35cc723

Browse files
authored
fixed dependenciesSatisfied for dependsOnIn, dependsOnNotIn, dependsOnNullOrZero (#28)
1 parent 1c1b863 commit 35cc723

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/FormField.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default {
124124
return;
125125
}
126126
127-
if (dependency.hasOwnProperty('nullOrZero') && 1 < [undefined, null, 0, '0'].indexOf(dependencyValue)) {
127+
if (dependency.hasOwnProperty('nullOrZero') && 1 < [undefined, null, 0, '0', ''].indexOf(dependencyValue)) {
128128
this.dependenciesSatisfied = true;
129129
return;
130130
}
@@ -144,7 +144,13 @@ export default {
144144
return;
145145
}
146146
147-
if (dependency.hasOwnProperty('value') && dependencyValue == dependency.value) {
147+
// perform this check only, if dependency has not other conditions applied
148+
// like: empty,notEmpty,nullOrZero,not,in,notin
149+
if (dependency.hasOwnProperty('value')
150+
&& dependencyValue == dependency.value
151+
&& !dependency.hasOwnProperty('in')
152+
&& !dependency.hasOwnProperty('notin')
153+
) {
148154
this.dependenciesSatisfied = true;
149155
return;
150156
}

0 commit comments

Comments
 (0)