- Issue created by @gugalamaciek
When I use shs_select2
module (2.0@RC) with select2 (4.0.13) I observe error in console related to the fact, that dataAdapter is NULL. In general all works, but this error is visible in console.
After these steps I see this error in console:
TypeError: Cannot read properties of null (reading 'current')
at HTMLSelectElement.<anonymous> (select2.min.js?sfsk82:2:61796)
at HTMLSelectElement.dispatch (jquery.min.js?v=3.7.1:2:40035)
at v.handle (jquery.min.js?v=3.7.1:2:38006)
at Object.trigger (jquery.min.js?v=3.7.1:2:70124)
at HTMLSelectElement.<anonymous> (jquery.min.js?v=3.7.1:2:70726)
at Function.each (jquery.min.js?v=3.7.1:2:3129)
at ce.fn.init.each (jquery.min.js?v=3.7.1:2:1594)
at ce.fn.init.trigger (jquery.min.js?v=3.7.1:2:70701)
at n.select (select2.min.js?sfsk82:2:33692)
at d.<anonymous> (select2.min.js?sfsk82:2:34502)
It looks like, that for some reason dataAdapter here is NULL:
d.prototype._registerDomEvents = function() {
var t = this;
this.$element.on("change.select2", function() {
t.dataAdapter.current(function(e) {
t.trigger("selection:update", {
data: e
})
})
}),
I tried to debug, but without success. I have no idea what's wrong. Maybe someone has idea and can help.
Active
2.0
Code