-
Notifications
You must be signed in to change notification settings - Fork 649
Support for conditional expression on individual types #234
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
Comments
I was thinking about this myself, it would reduce form definition bloat, I have so many similar conditions the definition is now quite massive. |
+1 for options that could reduce form complexity.
Is this something that might be added to sf? Or are there any workarounds that could insert an ng-hide? |
I just pushed form option Love to hear your feedback on it! |
Nice. Your solution is better than mine. I've just duplicated the ng-if directive in custom templates, because I also needed access to custom variables in the evaluation scope (a part of my dynamic form definition builder). |
@rhelgeby I' don't know if you've gleaned at the code, but it basically slaps on an ng-if on the decorator directives children, i.e. on the top level of the template. I tried to be smart about it though so of there already is an ng-if it adds it as an If it fits your needs just close the issue :-) |
Yes, I've studied that code. When this gets into master I can simplify my custom ng-if directives and avoid duplication so it will combine the built-in expression with my custom expression like you mentioned. Thank you. |
@rhelgeby no promises, but we're aiming at monday morning for a release. |
That's ok, no rush. I have already made a workaround. |
Since the only special thing about the conditional type is an ng-if directive in the template, it may be useful to support conditional in other types too.
Not very important, though it would simplify some form definitions. The workaround is just to wrap it in a conditional type.
The text was updated successfully, but these errors were encountered: