Magento 2 – How to Set Custom Limit for Pagination

collection;custommagento2pagination

how can i set the custom limit for pager. this is adding the limit in page and page is showing but the dropdown on limit is not showing on page how to dropdown of limit on Custom Collection.

->setAvailableLimit(array(1=>1,2=>2,3=>3))

i tried this but not working

public function getAvailableLimit()
    {
        return array(1=>1,2=>2,3=>3);
    }

Best Answer

after spending many of hours i checked this is a css by default

.limiter {
    display: none;
}

so i have to overwrite in my module

.news-index-index .limiter {
    display: block !important;
}
Related Topic