AUI 7.8.x vs AUI 7.9.x
I’m trying to use auiSelect2 to retrieve my data dynamically but when i’m calling auiSelect2()
The console are showing
Uncaught TypeError: Cannot read property ‘apply’ of undefined
at init.d.default.fn.auiSelect2 (com.atlassian.auiplugin:internal-src-js-aui-select2.js?locale=en-SG:4)
at :1:39
Before this the console is already showing that this is failing when trying to init
Example
AJS.toInit(function() {
AJS.$("#aui-select2").auiSelect2({
data: loadMyData,
formatResult: format,
formatSelection: format
});
//of course i have 2 of my function here loadMyData and format
});
I realized this only fail in JIRA core 7.12 and above where there is a change in AUI plugin version. I checked the select2.js and did not find any changes or perhaps i missed out some stuff here.
Note: Same code base work in 7.11.x but fail in jira version 7.12.x and above