From b1deaefcb2d44d1d5776906ddfba8683666113d2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 17 Feb 2021 12:35:30 -0500 Subject: [PATCH] SearchKit - Use entityRef widget for ID fields --- .../crmSearchInput/crmSearchInputVal.component.js | 3 ++- ext/search/ang/crmSearchActions/crmSearchInput/entityRef.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/search/ang/crmSearchActions/crmSearchInput/crmSearchInputVal.component.js b/ext/search/ang/crmSearchActions/crmSearchInput/crmSearchInputVal.component.js index 6fbed45078..3a6e30066f 100644 --- a/ext/search/ang/crmSearchActions/crmSearchInput/crmSearchInputVal.component.js +++ b/ext/search/ang/crmSearchActions/crmSearchInput/crmSearchInputVal.component.js @@ -16,6 +16,7 @@ this.$onInit = function() { var rendered = false; ctrl.dateRanges = CRM.crmSearchActions.dateRanges; + ctrl.entity = ctrl.field.fk_entity || ctrl.field.entity; this.ngModel.$render = function() { ctrl.value = ctrl.ngModel.$viewValue; @@ -97,7 +98,7 @@ return '~/crmSearchActions/crmSearchInput/select.html'; } - if (ctrl.field.fk_entity) { + if (ctrl.field.fk_entity || ctrl.field.name === 'id') { return '~/crmSearchActions/crmSearchInput/entityRef.html'; } diff --git a/ext/search/ang/crmSearchActions/crmSearchInput/entityRef.html b/ext/search/ang/crmSearchActions/crmSearchInput/entityRef.html index 2ad7bc93a7..7d9704e99b 100644 --- a/ext/search/ang/crmSearchActions/crmSearchInput/entityRef.html +++ b/ext/search/ang/crmSearchActions/crmSearchInput/entityRef.html @@ -1,6 +1,6 @@
- +
- +
-- 2.25.1