SearchKit - improve handling of dynamic tags for search displays
[civicrm-core.git] / ext / search / ang / crmSearchAdmin / crmSearchAdmin.component.js
index 7f82c23886ec7c0214cf3b313fb473fa47fff0db..cc927aa8e4ff5108a63a25a2c8a1158cf3650554 100644 (file)
@@ -15,7 +15,7 @@
       this.selectedRows = [];
       this.limit = CRM.cache.get('searchPageSize', 30);
       this.page = 1;
-      this.displayTypes = _.indexBy(CRM.crmSearchAdmin.displayTypes, 'name');
+      this.displayTypes = _.indexBy(CRM.crmSearchAdmin.displayTypes, 'id');
       // After a search this.results is an object of result arrays keyed by page,
       // Initially this.results is an empty string because 1: it's falsey (unlike an empty object) and 2: it doesn't throw an error if you try to access undefined properties (unlike null)
       this.results = '';