ngx-schema-form
ngx-schema-form copied to clipboard
JSON Schema validation
Hello,
I am looking for a solution to show an element according to an interval of another, i know i have to use the visibleif condition but it seems to be not applyable in such case :/
for example : 'X': { 'type': 'number', 'description': 'X ? :', }, 'Y': { 'type': 'number', 'description': 'Y ? : ', 'visibleIf': { what condition can be used here to make a check if X >= 400 then show Y else hide it ?? } }
I hope some can figure it out ;) Thanks in advance.
Currently only an exact value and $ANY
are supported.
In consequence this would require to create up to 400 comparison statements in your visibleIf
property.
I agree with you that an handling for most common expression like <
,<=
,>
,>=
, etc... would be usefull here.
Someone should make a feature request out of this issue.
I have taken action into this with commit a1bcc9c .
With this pull request the comes the support for expression in the visibleIf
condition.
See also README.MD