Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 702 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 702 Bytes

Programmatically Scroll through Primeng Turbo Table

Dependencies

https://github.com/brtnshrdr/angular2-hotkeys

https://www.primefaces.org/primeng/#/setup

Installation

Copy hotkey-scroll.directive.ts to your project. Import and export HotkeyScrollDirective into a shared module.

Example

<div [appHotkeyScroll]="dt">

  <p-table #dt 
    [scrollable]="true"
    scrollHeight="calc(100vh - 100px)"
    ...
    >
      ...
  </p-table>

</div>

User Interaction

The div containing the PrimeNg table will need to have focus. Then pressing the Home, End, Page Up and Page Down keys will adjust the scroll position accordingly. Tested on a Mac with an extended keyboard.