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
In some cases, I would like to be able to bind to snippet parameters similar to how it is already possible with component properties.
Let's say we have a component with a dialog that wraps the button that toggle it: example.
In case you need to activate this dialog from the outside, binding to the toggle parameter would work perfectly, but that option is not available right now. As a workaround, you can use a “component in the middle” that will take in a snippet parameter and return the same: example.
I may have overlooked some cases and there is a better solution.
Instead of adding a “component in the middle” as done in the previous link, it would be great to have the ability to bind directly to a snippet parameter, something like this (pseudocode):
There should be very few cases where something like this should be necessary or even makes sense.
E.g. here you could just export the function and invoke it on the instance.
// in Dialogexportconsttoggle=()=>(isShown=!isShown)
Describe the problem
In some cases, I would like to be able to bind to snippet parameters similar to how it is already possible with component properties.
Let's say we have a component with a dialog that wraps the button that toggle it: example.
In case you need to activate this dialog from the outside, binding to the
toggle
parameter would work perfectly, but that option is not available right now. As a workaround, you can use a “component in the middle” that will take in a snippet parameter and return the same: example.I may have overlooked some cases and there is a better solution.
Probably overlaps with that.
Describe the proposed solution
Instead of adding a “component in the middle” as done in the previous link, it would be great to have the ability to bind directly to a snippet parameter, something like this (pseudocode):
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: