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

lengthMenu is not showing up #1556

Closed
jagroop opened this issue Dec 18, 2017 · 3 comments
Closed

lengthMenu is not showing up #1556

jagroop opened this issue Dec 18, 2017 · 3 comments

Comments

@jagroop
Copy link

jagroop commented Dec 18, 2017

Summary of problem or feature request

I am using data tables as service, and lengthMenu is not showing up

missing

return $this->builder()
            ->columns($this->getColumns())
            ->minifiedAjax()
            // ->addAction(['width' => '80px'])
            ->parameters([
                'lengthMenu' => [ 10, 25, 50, 75, 100 ],
                'dom'     => 'Bfrtip',
                'order'   => [[0, 'desc']],
                'buttons' => [
                    'create',
                    'export',
                    'print',
                    'reset',
                    'reload',
                ],
            ]);

System details

  • UBUNTU 16.04
  • PHP 7.0
  • Laravel Version 5.5.23
  • Laravel-Datatables Version 8

THANKS !!

@yajra
Copy link
Owner

yajra commented Dec 22, 2017

Are you extending the dataTables default? Better check that you are not disabling the pageLength and other related options. Also, it seems like you are using a custom styles, thus double check that you have a visible page info layer?

@jagroop
Copy link
Author

jagroop commented Dec 22, 2017

@yajra thanks for replying , ok i will check and inform you shortly.

@jagroop
Copy link
Author

jagroop commented Dec 22, 2017

thanks @yajra
i made the below changes and it worked 👍

return $this->builder()
            ->columns($this->getColumns())
            ->minifiedAjax()
            // ->addAction(['width' => '80px'])
            ->parameters([
                'lengthMenu' => [
                        [ 10, 25, 50, -1 ],
                        [ '10 rows', '25 rows', '50 rows', 'Show all' ]
                ],                      
                'dom'     => 'Bfrtip',
                'order'   => [[0, 'desc']],
                'buttons' => [
                    'pageLength',
                    'create',
                    'export',
                    'print',
                    'reset',
                    'reload',
                ],
            ]);

@jagroop jagroop closed this as completed Dec 22, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants