0

当 rowdetails 在 ngx-datatable 中展开时,有什么方法可以突出显示该行?

我们可以得到突出显示的扩展行。但无法点击点击的行

4

1 回答 1

0
findParentNode(parentName, childObj) {
let tempNodeObj = childObj.parentNode;
while(tempNodeObj.tagName != parentName) {
  tempNodeObj = tempNodeObj.parentNode;
}
return tempNodeObj;
}

this.findParentNode('DATATABLE-BODY-ROW',$event.target);

这将帮助您找到数据表行元素

this.render.addClass(findParentNode,"row-expanded");
于 2017-12-19T10:09:37.183 回答