Conditional display of field
What needs to be done?
Some fields sometime need to be displayed only under certain conditions. This could be done by adding an attribute on the component that executes a javascript test on the resource.
It could be something like:
<solid-display
fields="title, extra_info"
conditional-extra_info="resource -> resource.has_extra_info == true"
></solid-display>
The function passed to the conditional-*
attribute takes the resources to which the component is binded and returns a boolean. Alternatively, a function name can be passed as value of the attribute.
This is an alternative solution to #546