commit ebd77675cca787a4ded22e1525bdb6812256c5a2 Author: Dhruv Srivastava Date: Mon Oct 12 22:43:48 2020 +0200 Fix filter function type in reply dialog The filter function actually returns a function that does the actual filtering instead of doing the filtering. This caused the bug where the filter function was not being called at all. Change-Id: I93e5ecf974311327e1588e02f2095f26a0c62cc1 diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts index 8e0d65c..50bf411 100644 --- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts +++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts @@ -247,10 +247,10 @@ export class GrReplyDialog extends KeyboardShortcutMixin( quote = ''; @property({type: Object}) - filterReviewerSuggestion: () => (input: Suggestion) => boolean; + filterReviewerSuggestion: (input: Suggestion) => boolean; @property({type: Object}) - filterCCSuggestion: () => (input: Suggestion) => boolean; + filterCCSuggestion: (input: Suggestion) => boolean; @property({type: Object}) permittedLabels?: LabelNameToValueMap; @@ -373,10 +373,10 @@ export class GrReplyDialog extends KeyboardShortcutMixin( constructor() { super(); - this.filterReviewerSuggestion = () => - this._filterReviewerSuggestionGenerator(false); - this.filterCCSuggestion = () => - this._filterReviewerSuggestionGenerator(true); + this.filterReviewerSuggestion = this._filterReviewerSuggestionGenerator( + false + ); + this.filterCCSuggestion = this._filterReviewerSuggestionGenerator(true); } /** @override */