diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index a4a12d2a06..2afb0578e3 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -1196,8 +1196,14 @@ export const Et2WithSearchMixin = >(superclass { return option.label.toLowerCase().includes(lower_search) || option.value.includes(search) }); + // Limit results + const totalCount = filtered.length; + if(filtered.length > Et2WidgetWithSearch.RESULT_LIMIT) + { + filtered.splice(Et2WidgetWithSearch.RESULT_LIMIT); + } // Add the matches - this.processRemoteResults(filtered); + this.processRemoteResults(filtered, totalCount); return filtered; }) .catch((_err) =>