From 8814f44b0193080b36fe28a77485e5489a5dd78e Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 17 Jan 2022 12:22:44 -0500 Subject: [PATCH] SearchKit - Fix token selector to use expression alias --- .../ang/crmSearchAdmin/crmSearchAdminTokenSelect.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearchAdminTokenSelect.component.js b/ext/search_kit/ang/crmSearchAdmin/crmSearchAdminTokenSelect.component.js index b1f69ba2f2e1..3b4642dd9b06 100644 --- a/ext/search_kit/ang/crmSearchAdmin/crmSearchAdminTokenSelect.component.js +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearchAdminTokenSelect.component.js @@ -30,7 +30,7 @@ var allFields = ctrl.admin.getAllFields(ctrl.suffix || '', ['Field', 'Custom', 'Extra', 'Pseudo']); _.eachRight(ctrl.admin.savedSearch.api_params.select, function(fieldName) { allFields.unshift({ - id: fieldName, + id: _.last(fieldName.split(' AS ')), text: searchMeta.getDefaultLabel(fieldName) }); });