From 429886139b679bb9c66c897f9fa2135769fa23da Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 11 Aug 2022 11:23:54 +0200 Subject: [PATCH] change default remoteQuery to send query and options as parameters and additional as GET parameters to support old taglist style callbacks and the select callbacks --- api/js/etemplate/Et2Select/SearchMixin.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index b4b0f921ac..8d145ae9a5 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -698,7 +698,11 @@ export const Et2WithSearchMixin = >(superclass * * This can be overridden to change request parameters or eg. send them as POST parameters. * - * Default implementation here sends options as (additional) GET paramters plus search string as $_GET['query']! + * Default implementation here sends search string and options: + * - as two parameters to the AJAX function + * - and (additional) as GET parameters plus search string as "query" + * + * This is done to support as well the old taglist callbacks, as the regular select ones! * * @param {string} search * @param {object} options @@ -707,7 +711,8 @@ export const Et2WithSearchMixin = >(superclass */ protected remoteQuery(search : string, options : object) { - return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.searchUrl), {query: search, ...options})).then((result) => + return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.searchUrl), + {query: search, ...options}), [search, options]).then((result) => { this.processRemoteResults(result); });