Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Select to set the number of elements displayed on the index page #6461

Open
AJIeksandro opened this issue Oct 2, 2024 · 0 comments
Open

Comments

@AJIeksandro
Copy link

Short description of what this feature will allow to do:

  1. Add a select to the index page, for example at the bottom and left of the list of items.
  2. The select contains integers in ascending order.
  3. Selecting a specific value allows you to display a specified number of items in list.

Example of how to use this feature

A. For all Entity Crud Controllers:

use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;

class DashboardController extends AbstractDashboardController
{
...
    public function configureCrud(): Crud
        {
            return Crud::new()
                ->setPaginatorPageSizes([5, 10, 20, 50, 100, 500, 1000]);
        }
}

B. For a particular Entity Crud Controller:


class TechnicalMeansCrudController extends AbstractCrudController
{
...
    public function configureCrud(Crud $crud): Crud
    {
        return $crud
                ->setPaginatorPageSizes([5, 10, 20, 50, 100, 500, 1000]);
    }
}```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant