Replies: 1 comment
-
Attributes with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I have a few components with a text-type trait set to null by default.
If the user doesn't change it, this trait is not included in the HTML output as an attribute (that's fine!).
HTML Output:
<mycomp />
If the user edits the trait, setting its value to X, this value is included in the output HTML too (fine again!).
HTML Output:
<mycomp mytrait="X" />
However, if the user deletes the content of the trait field leaving it empty, the HTML output still includes the attribute with an empty string:
HTML Output:
<mycomp mytrait="" />
Is there any way from preventing the attribute from being. included at all?
Expected HTML Output:
<mycomp />
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions