I have p-checkbox components in a table and want to disable the component getting the focus and centering the view on it when clicked.
This is in my html:
Code: Select all
<p-checkbox
name="select-{{rowIndex}}"
[(ngModel)]="quotationLine['selectedForDeletion']"
binary="true" (focus)="onFocus($event)"
(onChange)="onSelectedForDeletion(quotationLine, $event)">
</p-checkbox>
Code: Select all
onFocus($event: FocusEvent) {
window.scrollBy(0, 0);
}