Fixes #11847: Fixed yii\widgets\Pjax to properly respond with partials when custom selector is used for container

This commit is contained in:
Alexander Makarov
2016-06-30 11:47:21 +03:00
parent 1dc688e35f
commit debb467f42
2 changed files with 2 additions and 1 deletions

View File

@ -173,7 +173,7 @@ class Pjax extends Widget
{
$headers = Yii::$app->getRequest()->getHeaders();
return $headers->get('X-Pjax') && $headers->get('X-Pjax-Container') === '#' . $this->options['id'];
return $headers->get('X-Pjax') && explode(' ', $headers->get('X-Pjax-Container'))[0] === '#' . $this->options['id'];
}
/**