Set up the completer (remote or local) with some data
Start searching (typing) until there are no matches
Press arrow-down (now the 0-index row is selected but that is not visible)
Press enter - selecting the invisible row
I have traced the issue to the ngOnDestroy method of the CtrRow directive.
The IF (this_rowIndex) evaluates to false if rowIndex is 0 or undefined - preventing unregistration of the row.
The temporary fix I have made is very ugly and hacky - on one of the parent components wrapping this:
@ViewChildren(CtrRow) set ctrRows(values: QueryList<CtrRow>) { values.forEach((row) => { row.ngOnDestroy = () => { row['dropdown'].unregisterRow(row['_rowIndex']); } }); }
Reproduction steps:
I have traced the issue to the ngOnDestroy method of the CtrRow directive. The IF (this_rowIndex) evaluates to false if rowIndex is 0 or undefined - preventing unregistration of the row.
The temporary fix I have made is very ugly and hacky - on one of the parent components wrapping this:
@ViewChildren(CtrRow) set ctrRows(values: QueryList<CtrRow>) { values.forEach((row) => { row.ngOnDestroy = () => { row['dropdown'].unregisterRow(row['_rowIndex']); } }); }