Item14656: textboxlist SelectValue event listener not functioning - typo in code or doc.
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Following docs outlined in
JQueryTextboxList, specifying
SelectValue
event listener does not appear to work. The parallel features
DeleteValue
event listener does appear to work fine.
Looking at the code (with a bit of help from
JanKrueger on irc), I did notice that on
line 295, the trigger refers to
SelectedValue
(rather than
SelectValue
as referenced in doc). Changing this in code (or modifying callback name in Doc) fixes issue.
--
LynnwoodBrown - 09 Mar 2018
Further testing revealed additional issue. If one only corrects the
SelectValue
callback name in the code, it gets called on both adding and deleting an item. I believe this is because
line 295 doesn't factor in the
suppressCallback
parameter passed when the
select
function is called from the
deselect
. The following code at line 295 corrects this, although perhaps there's a more eloquent solution.
if (!suppressCallback) {
self.input.trigger("SelectedValue", values);
}
--
LynnwoodBrown - 09 Mar 2018
The code analysis is correct, as well as the proposed fix. Please go ahead and check it in. Thanks a lot.
--
MichaelDaum - 20 Mar 2018