I need to fix a problem that invokes primeng's resize binding method. The issue is with the following method:
bindResizeObserver() {
this.container = DomHandler.findSingle(this.el.nativeElement, '[data-pc-section="navcontent"]');
this.list = DomHandler.findSingle(this.el.nativeElement, '[data-pc-section="nav"]');
this.resizeObserver = new ResizeObserver(() => {
if (this.list.offsetWidth > this.container.offsetWidth) {
this.buttonVisible = true;
}
else {
this.buttonVisible = false;
}
this.updateButtonState();
this.cd.detectChanges();
});
this.resizeObserver.observe(this.container);
}
It returns always false. My thought is to always add 1 px to the inner element's width so the condition is always true. How can I always add 1 px to the width of the list element