-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visible If not working if value is [0] #431
Comments
A working example on Stackblitz (click) for your schema: {
"type": "object",
"properties": {
"selectField": {
"type": "string",
"widget": "select",
"oneOf": [
{
"enum": ["0"],
"description": "Zero"
},
{
"enum": ["1"],
"description": "One"
}
]
},
"columns": {
"type": "array",
"title": "Columns",
"items": {
"type": "object",
"properties": {
"color": {
"type": "string",
"description": "Color",
"widget": "color-picker"
}
}
},
"visibleIf": {
"selectField": [0]
}
}
}
}
@AleksaDursun would you take a look on it? |
That is the workaround I found as well, but the issue still persists. If the value is equal to 0 (number zero) it does not work. |
Got the same problem.
The truth value of variable My workaround is to use |
…m upgrade-to-angular14 to master * commit '3e264e578a104328c3137715e2c446077c99aff6': (38 commits) version 2.8.4 Prevent multiple calls of _bindVisibility for the same elements when traversing the tree structure version 2.8.3 Fixed Two-way data binding when using visibleIf Fixed typo in README and removed doubling of words version 2.8.2 feat: Added chainable oneOf and allOf in visibleIf fix dep versions Bump minimist from 1.2.5 to 1.2.6 Upgrade to Angular 14, fix guillotinaweb#443 version 2.7.2 Fix for guillotinaweb#431 Use DisableControlDirective for widgets to remove warnings for reactive forms. Changed cp command in build:lib to use ncp because there is no cp on windows machines. version 2.7.1 Add nullable schema.title check Bump karma from 6.3.14 to 6.3.16 Bump follow-redirects from 1.14.7 to 1.14.8 Bump karma from 6.3.9 to 6.3.14 Built-in ability to let compile the schema so defs and refs get resolved ...
When my
selectField
value is 0 the schema does not render the fields that havevisibleIf: {selectField: [0]}
.This is the code in my schema.
{ type: 'array', title: 'Columns', items: { type: 'object', properties: { color: { type: 'string', description: 'Color', widget: 'color-picker', } }, }, visibleIf: { selectField: [0] }, }
The text was updated successfully, but these errors were encountered: