Style Attribute Bug

When setting the Style attribute, selecting the Important box deletes the value you just very carefully typed in.

(@Teodor, first use of screentogif! :slight_smile:)

important

I am not able to recreate this.
Also, what are you trying to achieve exactly? This is a dynamic attribute, i.e. it expects a dynamic value there.
If you want to apply display: none you need to add it in the styles panel or in the app structure, using the display options.

I was trying to achieve this:

If I select a dynamic attribute from the thunder icon it works okay, but if I type something in as you suggest in the above post then it gets deleted when Important is ticked.

So it works fine when you properly use the data picker as explained in the topic you linked?

Yes… but your post talks about typing in a if then else structure, then it doesn’t work.

Oh, am I typing it in the wrong place?
Even so, it is a bit confusing that ticking important makes your text go away!

Sorry i don;t understand if you are using this field properly or not.
Can you explain in details what happens and when, if you are using this field as it is supposed to, and not just randomly typing some random letters inside.

Also - is it only disappearing from the UI or also from the code?

I tested again, and it doesn’t seem to happen here:
important

Okay… so if I type:

show_1.value == 0 ? 'none' : ''

after clicking the thunder icon and entering it in the Data Bindings window, it works okay.

If I just type it into the Value field without clicking on the thunder icon, then all sorts of strange things happen… sometimes the value I have typed in disappears, sometimes the name of the style disappears… it seems quite random… the code seems correct… the values are just disappearing from the Properties window.

It is a dynamic attribute, it needs wiggly brackets (to use your term)

No, it doesn’t need brackets here, as it is a dynamic attribute. Static parts must be wrapped in single quotes.

Goes back to drinking beer :grinning:

2 Likes