On Plone 6.1, I'm trying to use the select2 pattern with callback action for onSelected (but this also applies to onSelecting, onDeselecting, onDeselected).
If I pass the callback as a string referencing an existing JS function via pattern options (options["onSelected"] = "myFunction"), the JS throws an error at this line after a selection has been made in the select2 field :
|
if (this.options.debug) { |
Uncaught TypeError: this is undefined
The function is never called.
On Plone 6.1, I'm trying to use the
select2pattern with callback action foronSelected(but this also applies toonSelecting,onDeselecting,onDeselected).If I pass the callback as a string referencing an existing JS function via pattern options (
options["onSelected"] = "myFunction"), the JS throws an error at this line after a selection has been made in the select2 field :mockup/src/pat/select2/select2.js
Line 133 in 253d77a
Uncaught TypeError: this is undefinedThe function is never called.