Skip to content

magento2 custom tab add product grid filter issue

I have faced an issue below code i have removed the below code then working filter fine but the page reload.

protected function _construct()
{
parent::_construct();
$this->setId(‘bliss_grid_products’);
$this->setDefaultSort(‘entity_id’);
$this->setDefaultDir(‘ASC’);
$this->setUseAjax(true);
if ($this->getRequest()->getParam(‘entity_id’)) {
$this->setDefaultFilter([‘in_products’ => 1]);
} else {
$this->setDefaultFilter([‘in_products’ => 0]);
}
$this->setSaveParametersInSession(true);
}