2
votes

i have already tried to solve the issue but not able to highlight row on click event.

<ng2-smart-table [settings]="settingsPatient" [source]="sourcePatient" (userRowSelect)="patientStudy($event)" (deleteConfirm)="onDeleteConfirm($event)">"

</ng2-smart-table>	

i am using angular 7 and when i click on any row in ng2-smart-table row not get highlighted e.g change colour of of row when i clicked on it.

this is my function for row click event-(userRowSelect)="patientStudy($event)".

2

2 Answers

2
votes

When a row is selected, 'selected' class is being added to it... this is where we can style the row using:

::ng-deep tbody  tr.ng2-smart-row.selected
{ background:lightblue !important; border:1px solid blue;}

working stackblitz is here

0
votes

This works for me:

::ng-deep .nb-theme-default ng2-smart-table tbody tr.selected, .nb-theme-default ng2-smart-table tbody tr:hover { background: rgb(34, 151, 190) !important; border:1px solid blue; }