ngx-datatable icon indicating copy to clipboard operation
ngx-datatable copied to clipboard

All rows are active after selecting row programmatically (table with groupping)

Open deamodis opened this issue 3 years ago • 2 comments

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

All rows are active instead of one specific (when specific row is selected programmatically).

Expected behavior

Only selected row is active.

Reproduction of the problem I chose row programmatically in AfterViewInit lifehook (that's just my test solution). Instead of activating one row, all rows are active (there is class active for every datatable-body-row DOM element).

Example: https://stackblitz.com/edit/angular-ngx-datatable-row-grouping-and-row-detail-7q3fwc?file=src/app/app.component.ts

What is the motivation / use case for changing the behavior? I want to add styling class for selected row. When I select row datatable-body-row is set with class active . So I can use this class to stylish selected row. But now it's not possible because all datatable-body-row are set with class active.

macOS Big Sur (11.0.1), WebStorm, npm.

  • Table version: 19.0.0 (bug reproduced for this table version) 14.0.0 (there is no such a bug on this table version)

  • Angular version: Tested on version 6.1.7 (bug is reproduced). Tested on version 12.1.3 (bug is reproduced as well).

  • Browser: all

  • Language:
  • TypeScript 2.7.2
  • TypeScript 4.3.5 (tested as well)

deamodis avatar Aug 09 '21 11:08 deamodis

I'm facing this issue as well with the latest version of ngx-datatable and angular.

is there any plans to fix it?

klammal avatar Jan 10 '22 10:01 klammal

I'm facing this issue. ngx-datatable: 20.0.0 angular: 13.3.0

zengchuan avatar May 17 '22 04:05 zengchuan