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

@ -43,6 +43,7 @@ Yii Framework 2 Change Log
- Enh #11168: `yii\helpers\BaseHtml` now uses abstracted `booleanInput()` and `activeBooleanInput()` methods to render `radio()`, `checkbox()`, `activeRadio()` and `activeCheckbox()` (cesarnicola)
- Bug #11822: Fixed exception on non-string value provided as CSRF token (cebe)
- Enh #11850: Introduced `yii\widgets\Pjax::$submitEvent` to be able to customize event triggering PJAX form submit (Bvanleeuwen)
- Bug #11847: Fixed `yii\widgets\Pjax` to properly respond with partials when custom selector is used for container (pigochu, samdark)
2.0.8 April 28, 2016
--------------------

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'];
}
/**