Closed abolotin closed 4 years ago
Hello :)
When widget loaded via AJAX, it's useful to use hashVarLoadPosition=View::POS_READY But some options (size, for example) are still at head of page, which does not rendered in AJAX mode.
src\Select2.php, function registerAssets():
$view->registerJs("var {$this->_s2OptionsVar} = {$options};", View::POS_HEAD);
should be replaced by:
$view->registerJs("var {$this->_s2OptionsVar} = {$options};", $this->hashVarLoadPosition);
?
Hello :)
When widget loaded via AJAX, it's useful to use hashVarLoadPosition=View::POS_READY But some options (size, for example) are still at head of page, which does not rendered in AJAX mode.
src\Select2.php, function registerAssets():
$view->registerJs("var {$this->_s2OptionsVar} = {$options};", View::POS_HEAD);
should be replaced by:
$view->registerJs("var {$this->_s2OptionsVar} = {$options};", $this->hashVarLoadPosition);
?