From 29196ea7786407407bd461a4f2a58bc073578645 Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Mon, 18 Mar 2024 20:50:23 +0200 Subject: [PATCH] Initiate searching for groups as soon as i select the user from the dropdown.Skip button click. --- webroot/js/autocomplete.js | 23 ++++++++++++++++++++--- webroot/js/page/UserManager.js | 9 ++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/webroot/js/autocomplete.js b/webroot/js/autocomplete.js index 52d81c7..368fec1 100644 --- a/webroot/js/autocomplete.js +++ b/webroot/js/autocomplete.js @@ -13,6 +13,14 @@ export default { activeBtn: { type: Boolean, default: true + }, + renderBtn: { + type: Boolean, + default: true + }, + preInfo: { + type: String, + default: '' } }, inject: ['txt', 'api'], @@ -82,13 +90,22 @@ export default { this.val = ui.item.identifier; this.item = ui.item; this.search = `${ui.item.label} (${ui.item.value})`; - $(`#${this.toKebabCase(this.action)}-btn`).prop('disabled', false).focus(); - return false; + if(this.renderBtn) { + $(`#${this.toKebabCase(this.action)}-btn`).prop('disabled', false).focus(); + } else { + // Since we are not rendering any button we will trigger the search + this.performAction() + } }, }) }, template: /*html*/`
+
+ + + +
-
+