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

clr-dg-pagination ignores initial value for clrDgPage #1466

Open
derkoe opened this issue Jun 27, 2024 · 2 comments
Open

clr-dg-pagination ignores initial value for clrDgPage #1466

derkoe opened this issue Jun 27, 2024 · 2 comments
Assignees

Comments

@derkoe
Copy link
Contributor

derkoe commented Jun 27, 2024

Describe the bug

When you pass in an inital value for clrDgPage to clr-dg-pagination it gets ignored and "1" will be used.

We need to set the initial page of the grid to a certain value because we receive the page number from an URL parameter.

How to reproduce

Here is a Stackblitz project reproducing it: https://stackblitz.com/edit/clarity-light-theme-clr17-1f4jud

Steps to reproduce the behavior:

  1. Open the Stackblitz project
  2. See that the current page is set to "5" on the left but the pager shows "1"
  3. When you now page forward the page is set to "2"

image

Expected behavior

I would expect that the pager takes the initial value and starts paging from this value.

Versions

Clarity version:

  • @clr/angular - 17.2.1
  • @clr/ui - -17.2.1
  • @cds/core - 6.9.2

Framework version:

  • @angular/core - 17.3.11

Device:

All devices.

Additional notes

none

@dtsanevmw
Copy link
Contributor

Hello,

Thanks for reporting! Order here matters so if you put the clrDgPageSize input before the page input it would work. That's happening due to page size being 0 by default and that's setting the page to 1. We'll log it internally and look forward that being more reactive.

Regards,
Daniel Tsanev

@dtsanevmw dtsanevmw self-assigned this Jun 28, 2024
@derkoe
Copy link
Contributor Author

derkoe commented Jul 12, 2024

BTW thanks for the workaround - that worked!

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

2 participants