New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No possibility to use multiple signal names #170
Comments
@jdanyow Couldn't the signal behavior be used multiple times? |
@EisenbergEffect No, this gives an error |
@jdanyow Would it be possible to make multiple instances of signal possible? If not, could we enable the signal behavior to receive either a signal name or an array of signals? What are your thoughts? |
I've made a non-breaking pull request that fixes this with rest parameters (all additional parameters are treated additional signal names). #172 |
@EisenbergEffect / @niieani - I was thinking the same as @niieani: update the behavior such that it accepts multiple name arguments. @niieani: thanks for the PR! Could you please make a few changes so we can merge it:
|
@jdanyow Sure, I'll do that when I get a moment. |
@jdanyow asked for a use case, so here's an example:
HTML (
task.html
):There are two things that can trigger a change of the
tags
property in the view model - either thetask
gets changed (somebody adds or removes a tag in it's view-model) or somebody renames one of the existing tags globally. In both of those instances I would like the binding to get reevaluated, because its value might have changed. I can send out signals in both instances (i.e. a signal for the specific task changing it's tags and a global app signal for the changes in tags). Therefore I'd like to be able to specify multiple signal names, lets say something like:Now the binding should get reevaluated when either of those signals gets sent.
The text was updated successfully, but these errors were encountered: