[Module] showIf #47
-
A directive that allows to define which property needs to be set in order show the block, otherwise the block will be hidden. The following block configuration will show the text block only if the {
type: 'text',
content: 'Some text',
modules:{
showIf: 'content'
}
} Another example, a shape block is rendered only if the custom field 'showMe' is set: {
type: 'shape',
color: 'red',
showMe: true,
modules:{
showIf: 'showMe'
}
} Another option: {
type: 'shape',
color: 'red',
someValue: 'a',
modules:{
showIf: {
key: 'someValue',
operator: '==', // ==, !=
value: 'a'
}
}
} What do you think? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The v1.0.8 includes this module 🚀 |
Beta Was this translation helpful? Give feedback.
The v1.0.8 includes this module 🚀