ngx-datatable
ngx-datatable copied to clipboard
The output (activate) returns the old row
I'm submitting a ... (check one with "x")
[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior The output (activate) returns the old row by keyboard events.
onActivate(event) { if (event.type === 'keydown' && (event.event.code === 'ArrowDown' || event.event.code === 'ArrowUp')) { console.log('row', event); this.selected = [ event.row ]; } }
Expected behavior The correct would be to receive the same row emitted on mouseover.
Reproduction of the problem https://stackblitz.com/edit/angular6-ngx-datatable-xy5gbr-yuvcpe
What is the motivation / use case for changing the behavior? I need to select a single line through the up and down keys, allowing keyboard navigation, where it will be possible with the enter key to open the details of the selected line, for example.
Please tell us about your environment: macOS 10.13.6, WebStorm, ng build and running Chrome
-
Table version: 13.1.0
-
Angular version: 6.1.0
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Chrome 67.0.3396.99
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
Also have the same problem: @angular-devkit/build-angular : 17.3.4 @angular-devkit/schematics : 0.0.42 @angular/cli : 17.3.3 @ionic/angular-toolkit : 10.0.0 @swimlane/ngx-datatable": "^20.1.0