Replies: 2 comments
-
Hey @mijewe, i actually get around this by just using an empty string to achieve the same thing. Additionally, you should actually be utilizing these keys to store the actual class, not a shorthand value, otherwise the value of the plugin is lost and you'd do just as well with a regular dropdown field. |
Beta Was this translation helpful? Give feedback.
-
Oh yeah that's a good idea - I'll try that thanks Well in this case I'm using the same values for two dropdowns in the CMS - spaceAbove and spaceBelow, and use those dropdowns in multiple places in various matrix blocks, so I still get the DRY aspect of the plugin. Though I guess I could use nested keys for above and below - good call |
Beta Was this translation helpful? Give feedback.
-
I would like to be able to set a null value in my .json config, so I can do a simple conditional in my template.
For example, I have a field
spaceAbove
that uses the following config:and then in my template I want to:
whereas currently I can't because
spaceAbove
isn'tnull
- it's a DesignToken object.I can work around this by setting the value to "none" and doing a check on
spaceAbove != "none"
, but it's not very tidy.Beta Was this translation helpful? Give feedback.
All reactions