0
ng2-smart-tableの最初の行を選択解除する方法はありますか?一度ロードされると、最初の行は常にselected
クラスを持ちます。まず、hover
を.scss
ファイルに追加して背景を変更しますが、最初のものは変更しませんが、リーマインする行のすべてが背景を変更する可能性があります。ng2スマートテーブルの最初の行の検索を非選択
tbody {
tr:hover {
background: #209e91;
}
}
例を見ると、最初の行にはロード時の背景があります。
EDIT:
データ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;
}