I am trying to get reference of the first row to allow arrow key navigation on table rows. I tried with the below code with the function, that is working in development build, but in production build angular removes ng-reflect bindings so I am not able to get reference. Is there any solution?
getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
let firstRow: any = this.getElementByXpath('//datatable-body-row[@ng-reflect-row-index="0"]');
if(firstRow) {
firstRow.focus();
}