gridview reload closes modal

On my Modal page is use

$.pjax.reload({container:’#calendar_grid’});

my js




<?php


$this->registerJs("

$(document).on('click', '.applybtn', function(e){

  $.pjax.reload({container:'#calendar_grid'});

});

");


?>

But this closes the modal.

It should refresh the "calendar_grid".

If you set ‘backdrop’ to false in the modal?


'clientOptions' => ['backdrop' => false]

Hi Jacmoe,

It’s still not working.

This is my modal code in main.php




    <?php yii\bootstrap\Modal::begin([

        'clientOptions' => ['backdrop' => 'static', 'keyboard' => false],

        'options' => [

            'id' => 'modalDialog',

            'tabindex' => false, // important for Select2 to work properly !!!

        ],

        'size' => 'modal-lg',

        'header' => '<h4 id="modalTitle">Edit...</h4>',

        'footer' =>

            Html::button('Close', ['class' => 'btn btn-default', 'data-dismiss' => 'modal'])

            . PHP_EOL .

            Html::button('Save', ['class' => 'btn btn-primary btn-modal-save', 'id' => 'saveModel'])

            . PHP_EOL .

            Html::button('Delete', ['class' => 'btn btn-danger btn-modal-delete', 'id' => 'deleteModel']),

        ]); ?>

    

    <div id='modalContent'></div>

        

    <?php yii\bootstrap\Modal::end() ?>



enyone?