I have debugged the code and got to the conclusion than the problem is located in the code for the documentClickListener.
This is the original code:
Code: Select all
this.documentClickListener = this.renderer.listenGlobal('body', 'click', () => {
if(!this.selfClick && this.overlayVisible) {
this.hide();
}
this.selfClick = false;
this.panelClick = false;
});
Code: Select all
&& !this.panelClick
I have implemented a workaround this that is is modifying the "onFilter(event)" method. This the original:
Code: Select all
onFilter(event) {
this.filterValue = event.target.value.trim().toLowerCase();
this.visibleOptions = [];
for(let i = 0; i < this.options.length; i++) {
let option = this.options[i];
if(option.label.toLowerCase().startsWith(this.filterValue.toLowerCase())) {
this.visibleOptions.push(option);
}
}
this.filtered = true;
}
Code: Select all
this.filtered = false
Code: Select all
ngAfterViewChecked() {
if(this.filtered) {
this.domHandler.relativePosition(this.panel, this.container);
this.filtered = false;
}
}
Please, let me know if you need more details, but it would be great to have these two issues corrected in 2.0.x, since what I have right now in my code is the methods stated above overriden to behave properly...
Thanks!