Closed mastef closed 5 years ago
Additionally the docs are wrong for changed
as newValues
and oldValues
is reversed.
function(select, newValues, oldValues, event){...}
should be :
function(select, oldValues, newValues, event){...}
@mastef Thanks for reporting these issues, I'll get these fixed up before releasing 0.4.0
The docs have been updated to reflect current functionality. d86f9f1 resolved this issue and will be merged into the main docs in the 0.4.0 release.
The documentation mentions that the callbacks are :
However the current behaviour is actually :
This is because the callbacks are called with
.call
:call()
uses the first parameter as the scope. So actually what happens is that the value ofselect
becomes the scope of the function, and not the first parameter.Fix 1 To fix this ( not sure you'd want to fix this, as it might break existing implementations ), you'd want to change it to :
Fix 2 It might be easier to fix the documentation instead, and move
select
to the end of the parameters - this would not break backwards compatibility.The docs would have to then be changed to :
Fix 3 Or just change the docs to document the current behaviour, and that the
select
element is available onthis
instead of the first parameter.