Skip to content

Commit

Permalink
SearchKit - Fix option loading & rendering for in-place edit
Browse files Browse the repository at this point in the history
Fixes dev/core#4037
  • Loading branch information
colemanw committed Dec 17, 2022
1 parent 785d5f8 commit e3711a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ext/search_kit/ang/crmSearchAdmin.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,10 @@
_.each(results, function(fields, entityName) {
var entity = getEntity(entityName);
_.each(fields, function(options, fieldName) {
_.find(entity.fields, {name: fieldName}).options = options;
var field = _.find(entity.fields, {name: fieldName});
if (field) {
field.options = options;
}
});
entity.optionsLoaded = true;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

if (!_.includes(['>', '<', '>=', '<='], ctrl.op)) {
// Only use option list if the field has a "name" suffix
if (field.options && field.suffixes && field.suffixes.includes('name')) {
if (field.options && (!field.suffixes || field.suffixes.includes('name'))) {
return '~/crmSearchTasks/crmSearchInput/select.html';
}
if (field.fk_entity || field.name === 'id') {
Expand Down

0 comments on commit e3711a1

Please sign in to comment.