components icon indicating copy to clipboard operation
components copied to clipboard

[Paginator] Please add hidePageRangeActions property for mat-paginator just like hidePageSize

Open ErVishalM opened this issue 5 years ago • 4 comments

Feature Description

Hi, I was using mat-paginator and I wanted to give a feature request. I do not want range action div in paginator. So can we add a property in mat paginator named as @Input() hideRangeActions: boolean just like @Input() hidePageSize: boolean image

Use Case

If I have set the property hideRangeActions = "true" then below div will hide and only page size div will be coming image

Validation

If I am using mat-paginator then only one of the input property can be true not both hideRangeActions = "true" or hidePageSize = "true"

ErVishalM avatar Feb 03 '21 13:02 ErVishalM

It wouldn't be much of a paginator if the actions were hidden since the user won't have the ability to change the page.

crisbeto avatar Feb 03 '21 16:02 crisbeto

@crisbeto User can change the page size which will show the number of results according to items per page drop-down selected value. So one of the property should be false as I wrote validation above.

ErVishalM avatar Feb 03 '21 17:02 ErVishalM

I don't think we would add an option for this since I think it's somewhat of an edge case to not want to support actually changing pages. It may make sense to swap this out for a custom component. You could also use display: none on that part of the control, but this is brittle since the DOM structure of the component could change over time.

jelbourn avatar Feb 04 '21 22:02 jelbourn

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.