Skip to content

Commit

Permalink
TableOutputComponent: Fix exception upon early Enter
Browse files Browse the repository at this point in the history
Prevent potentially undefined rowNode.data to still be referred to in
searchEvents. This can happen when user hits Enter very early while
applying a Search filter in a column.

Contributes to fixing #859.

Signed-off-by: Marco Miller <marco.miller@ericsson.com>
  • Loading branch information
marco-miller committed Nov 1, 2022
1 parent 32dc39f commit 97457e1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ export class TableOutputComponent extends AbstractOutputComponent<TableOutputPro
}
if (this.gridApi) {
this.gridApi.forEachNode(rowNode => {
if (!rowNode.data) {
// hitting Enter early in Search field(s) can lead here
return;
}
let isMatched = true;
this.filterModel.forEach((value, key) => {
if ((rowNode.data[key].search(new RegExp(value)) === -1)) {
Expand Down

0 comments on commit 97457e1

Please sign in to comment.