Description
I have a custom component for array types, when i add a hideExpression to my schema i expect my custom template to be hidden when setting a value in the model. I'm currently using JSON schema to render my fields.
My other fields that are not using custom templates show/hide perfectly such as the filterable field.
When I select grid in a dropdown i expect the size field to appear but it does not. However the filterable field appears.
Upon further inspection, display: none is not removed from the <formly-field> which contains the custom template.
Minimal Reproduction
https://stackblitz.com/edit/angular-qkrz6z
Your Environment
related to https://github.com/ngx-formly/ngx-formly/issues/704#issuecomment-364661614 try with:
"hideExpression": "field.parent.model.display !== 'grid'"
Hi,
I have tried the above and I'm still experiencing the same issue. I also tried the formState.mainModel approach and no luck :(
"hideExpression": "field.parent.model.display !== 'grid'" works fine on the filterable boolean, but not the repeatable section.
I'm not sure what it could be.
the above expression should be used in the repeatable section:
https://stackblitz.com/edit/angular-qkrz6z-9tkjj3
Most helpful comment
the above expression should be used in the repeatable section:
https://stackblitz.com/edit/angular-qkrz6z-9tkjj3