You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MyTemplate()
.HidePanel(fun e -> e.Vars.PanelClass :="hidden")
.ShowPanel(fun e -> e.Vars.PanelClass :="")
.Doc()
Right now the above doesn't work, because PanelClass can only be bound as a string or View<string>, not Var<string>. It is only doable by adding something like this in the HTML, but it's quite hackish:
<inputtype="hidden" ws-var="PanelClass">
I'm not sure what form this would take, but it needs to be known statically. Ideas:
Use a special syntax when declaring the hole itself, such as ${!Name}.
Pass a list of vars when declaring the provider:
typeMyTemplate= Template<"index.html", Vars ="PanelClass,SomeOtherVar">
The text was updated successfully, but these errors were encountered:
This would be particularly useful in a server-side scenario where you just want a small client function to toggle a value, for example:
Right now the above doesn't work, because
PanelClass
can only be bound as astring
orView<string>
, notVar<string>
. It is only doable by adding something like this in the HTML, but it's quite hackish:I'm not sure what form this would take, but it needs to be known statically. Ideas:
Use a special syntax when declaring the hole itself, such as
${!Name}
.Pass a list of vars when declaring the provider:
The text was updated successfully, but these errors were encountered: