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
This commit is contained in:
Dhruv Srivastava
2020-10-12 22:43:48 +02:00
parent 744b30bafc
commit ebd77675cc

View File

@@ -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 */