Issue
Is there any way to unselect the first row in ng2-smart-table? Note once it is loaded the first row always has the selected
class. The thing is I want to add a hover
in a.scss
file to change the background, but it never changes the first one, but all of the reamining rows can change background.
tbody {
tr:hover {
background: #209e91;
}
}
Look at this example, the first row has a background when it is loaded.
EDIT:
Looking at the source it seems to select it arbitrary:
data-set.ts
protected willSelect: string = 'first';
...
select(): Row {
if (this.getRows().length === 0) {
return;
}
if (this.willSelect) {
if (this.willSelect === 'first') {
this.selectFirstRow();
}
if (this.willSelect === 'last') {
this.selectLastRow();
}
this.willSelect = '';
} else {
this.selectFirstRow();
}
return this.selectedRow;
}
Solution
Add !important
to override the the styling from the selected
class
tbody tr:hover {
background: #209e91 !important;
}
Answered By - K Scandrett
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.