question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Page initialization

See original GitHub issue

I’m submitting a …

[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior N/A

Expected behavior Set the page number / initialize with a page number

Reproduction of the problem N/A

What is the motivation / use case for changing the behavior? Would be incredibly useful to be able to set the starting page of the component. I have a use case that stores various pagination settings across the lifecycle of the app, and returning to a page should restore the pagination to the state it was previously at. (I’m using server side pagination). However as far as I can tell (please correct me if I’m wrong), this is not currently possible.

UPDATE: I’m using server side pagination externalPaging, which works fine, and calls the page output as appropriate, which works fine. What I need to do is get into the table, an initial page number, such that the pagination control is initialised with this page visually. Currently if I set the start page and provide the table with the correct data, the paging control still will show page 1. I cannot see a way to initialise this paging control. There is no page input… Forgive me if I’m missing something obvious.

UPDATE WITH EXAMPLE: As a crude example: plnkr In this example pagination is emulated given the example company dataset. I’m using externalPaging. I’m attempting to demonstrate that if I initialize my page to 2 (1 zero indexed), and use this to retrieve the data, the correct data for page 2 is displayed, but that there is no way to initialize the page number in the pagination control to match this. There is no page number input. So if you click on page 2, you’ll notice the content doesn’t change: this is because it was already showing the data from page 2, but now show’s page 2 itself having invoked (page).

Please tell us about your environment: N/A

  • Table version: 9.3.1

  • Angular version: 4.1.2

  • Browser: [all]

  • Language: [all]

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
quadracikcommented, Mar 13, 2019

Greetings! Any update on this? I also need sometimes to go back to the view displaying the datatable and it would be great to be able to “restore” its state. Currently all I can do is to pass an ‘offset’ input variable and it seems to correctly set page number in the pagination but the table itself doesn’t scroll to correct page. Did anyone find any workaround for this?

  • Table version: 13.1.0
  • Angular version: 6.1.0
0reactions
MatthewTroutcommented, Aug 9, 2017

@amcdnl updated description with plunker example

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Initialization Page <add> - Microsoft Learn
initializationPage, Required string attribute. Specifies the URL of an application to be initialized upon application restart. The default value ...
Read more >
Initializing pages - Sitecore Documentation
Initializing pages · Parses the page and instantiates all components and controls. · Combines all component and controls in a JavaScript data ...
Read more >
Initialize Page variable in Spring - java - Stack Overflow
Creates a new PageImpl with the given content. This will result in the created Page being identical to the entire List. For example:...
Read more >
Page view triggers - Tag Manager Help - Google Support
Each web container includes an Initialization - All Pages trigger by default. Select this trigger to fire any tags that should fire before...
Read more >
Initializing and Finalizing a JSP Page (The Java EE 5 Tutorial)
You can customize the initialization process to allow the JSP page to read persistent configuration data, initialize resources, and perform any other ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found