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

[md-paginator] pageSize keeps default of 50 even if pageSizeOptions only has 1 option which is not 50 #5767

Closed
Lior-G opened this issue Jul 14, 2017 · 3 comments · Fixed by #5822
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Lior-G
Copy link

Lior-G commented Jul 14, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

if there is only 1 option set in pageSizeOptions, it should overwrite the default

What is the current behavior?

default is 50 even if it does not exist in pageSizeOptions

What are the steps to reproduce?

<md-paginator
[length]="100"
[pageSizeOptions]="[10]">

What is the use-case or motivation for changing an existing behavior?

simplify code of user only needs/wants 1 page size

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"@angular/core": "4.2.6",
"@angular/cdk: 2.0.0-beta.8",
"@angular/material": "^2.0.0-beta.8",

"@angular/cli": "1.2.0",
"@angular/compiler-cli": "4.2.6",

Is there anything else we should know?

@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jul 14, 2017
@jelbourn
Copy link
Member

@andrewseguin couple of things:

  • We should hide the select if there's only one option
  • We should default the initial page size to one of the options if options are provided that don't match the default page size

@ghost
Copy link

ghost commented Jul 24, 2017

how i can get the next or prev button click event ??

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants