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
Fix issue with input rate policies #2404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original code, the explicit contribution of type
to the setInput()
key in addition to id
makes me wonder if this is removing some historical feature.
Is it possible that having multiple inputs with the same ID, but different types, is a thing someone would do for some reason?
If we can rule that out then this seems like solid improvement.
I don't think it's intended for the rate policy to depend on the input type, so I'm fairly certain that |
Already reviewed...also Joe has stepped in to provide a review
…ype before looking up the input's rate policy, closes #2387
change the name of these arguments to reflect this (name_type)
this will help to highlight when you should call a method with just the input name instead of both the name and the type
See #2387 for a motivating example. In that example, the slider starts off with the correct
Debouncer
input rate policy, but when the slider is updated, it's policy changes to the defaultInvoker
(i.e. immediate) rate policy.It seems this happens because
InputRateDecorators
's$ensureInit()
method is called with aname
that contains both the input id and type. As a result, when the type of an input changes, it fails to look up the input rate policy and ends up defaulting toInvoker()
instead.