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

Feature Request - Paging Bar: Jump to Row # or Percent #743

Closed
jdundondev opened this issue Jul 5, 2017 · 4 comments · Fixed by #764
Closed

Feature Request - Paging Bar: Jump to Row # or Percent #743

jdundondev opened this issue Jul 5, 2017 · 4 comments · Fixed by #764
Assignees
Milestone

Comments

@jdundondev
Copy link

This issue is related to another closed issue: https://github.com/Teradata/covalent/issues/496

For tables with a large number of rows, clicking next-page or jumping to a particular page number is not an ideal user experience. For example, if I have 1M rows, I have 17 rows per page and I want to jump to the rows half way through, which page number should I enter (answer: 1000000 / 17 / 2 = page 29411).

In addition to jumping to a particular page, it would be nice to be able to jump to a particular row number or percentage of the total number of rows. For example:

Jump to: page 29441
Jump to: row 500000
Jump to: 50%

The jump type could be specified via a selector following the field. For example:

screen shot 2017-07-05 at 2 00 16 pm

@jdundondev
Copy link
Author

The existing API (emitting a IPageChangeEvent) would not need to change if the page calculation was done internally.

@kyleledbetter
Copy link
Contributor

yup want this as well, it's actually a paging bar component feature request

@jdundondev jdundondev changed the title Feature Request - Data Table: Jump to Row # or Percent Feature Request - Paging Bar: Jump to Row # or Percent Jul 5, 2017
@jdundondev
Copy link
Author

Great. I changed the title to indicate it's related to the paging bar.

@jeremysmartt jeremysmartt self-assigned this Jul 13, 2017
@emoralesb05
Copy link
Contributor

emoralesb05 commented Jul 20, 2017

This is going to be more docs and demos rather than a feature since devs can already implement this. We just had to add few minor changes to the layout.

e.g.

<td-paging-bar #pagingBar [pageSizes]="[50,100,200,500,1000,2000]" pageLinkCount="5" [firstLast]="false" [initialPage]="1" [pageSize]="100" [total]="1345" (change)="change($event)">
  <span td-paging-bar-label hide-xs>Row per page:</span>
  {{pagingBar.range}} <span hide-xs>of {{pagingBar.total}}</span>
  <p hide-xs>Go to:</p>
  <md-input-container>
    <input #goToInput
          mdInput
          type="number"
          [min]="1"
          [max]="pagingBar.maxPage"
          [value]="pagingBar.page"
          (blur)="goToInput.value = pagingBar.page"
          (keyup.enter)="pagingBar.navigateToPage(goToInput.value); goToInput.value = pagingBar.page"/>
  </md-input-container>
</td-paging-bar>

More info here #764

With this is up to the dev to decide if its rows, pages or % and parse it to a correct page with all the paging bar API's

@emoralesb05 emoralesb05 added this to the Next Release milestone Jul 20, 2017
emoralesb05 pushed a commit that referenced this issue Jul 20, 2017
…ging exposed API's (#764)

add a new demo to show developers how to leverage paging-bar exposed API's with a material input.

closes #743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants