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,18 +102,18 @@ class Pjax extends Widget ...@@ -102,18 +102,18 @@ class Pjax extends Widget
if ($view->title !== null) { if ($view->title !== null) {
echo Html::tag('title', Html::encode($view->title)); echo Html::tag('title', Html::encode($view->title));
} }
} } else {
echo Html::beginTag('div', $this->options); echo Html::beginTag('div', $this->options);
} }
}
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function run() public function run()
{ {
echo Html::endTag('div');
if (!$this->requiresPjax()) { if (!$this->requiresPjax()) {
echo Html::endTag('div');
$this->registerClientScript(); $this->registerClientScript();
return; 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