Commit 72ff9c58 by Alex-Code

Pjax container only required on first load.

Pjax inserts the response HTML into the container, it doesn't replace it. So any subsequent pjax requests duplicate the container.
parent 97b60782
......@@ -102,8 +102,9 @@ class Pjax extends Widget
if ($view->title !== null) {
echo Html::tag('title', Html::encode($view->title));
}
} else {
echo Html::beginTag('div', $this->options);
}
echo Html::beginTag('div', $this->options);
}
/**
......@@ -111,9 +112,8 @@ class Pjax extends Widget
*/
public function run()
{
echo Html::endTag('div');
if (!$this->requiresPjax()) {
echo Html::endTag('div');
$this->registerClientScript();
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment