Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some options, like widget size, does not applied if widget loaded via AJAX #325

Closed
abolotin opened this issue Jul 19, 2020 · 0 comments
Closed

Comments

@abolotin
Copy link

abolotin commented Jul 19, 2020

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);

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants