Dynamic change limit size of paginator isn't working

Second question for the group.
Cakephp 4.
I use the paginator to manage displaying search results. I want the user to have the option to change the number of results per page using a drop down [50,100,200,500,1000]. I use the following code in the template:

<ul class="pagination">
            <?php echo $this->Paginator->limitControl([50 => 50, 100 => 100, 200 => 200, 500 => 500, 1000 => 1000],null,
                ['templates' => ['inputContainer' => '{{content}}'],
                    'label' =>'','style'=>'vertical-align: text-top; width:20px; height:30px;']);
            echo $this->Paginator->first('<< ' . __('first')) ?>
            <?= $this->Paginator->prev('< ' . __('previous')) ?>
            <?= $this->Paginator->numbers() ?>
            <?= $this->Paginator->next(__('next') . ' >') ?>
            <?= $this->Paginator->last(__('last') . ' >>') ?>
        </ul>

The control works when selecting 50 or 100 items per page. Anything above that e.g. 200,500,1000 results in 100 items per page. Changing the options to greater than 100 such as [200,500,1000] still results in only 100 per page.

Anyone else have this issue? Any suggestions on a resolution?

Thanks,
KBG

Its called the maxLimit which is set to 100 by default.
You need to adjust that value to allow greater paginated limits.
See Pagination - 4.x

1 Like

Yes. That’s the fix. Set this property just prior to calling paginate method in the controller.

Thanks!