Skip to content

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

Closed
@abolotin

Description

@abolotin

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

?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions