[Module] showIf #47
Answered
by
abusedmedia
abusedmedia
asked this question in
Ideas
-
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.
Answered by
abusedmedia
Dec 22, 2021
Replies: 1 comment
-
The v1.0.8 includes this module 🚀 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
abusedmedia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The v1.0.8 includes this module 🚀