diff --git a/ext/search_kit/Civi/Api4/Action/SearchDisplay/GetDefault.php b/ext/search_kit/Civi/Api4/Action/SearchDisplay/GetDefault.php index 9ae2d8ad6dfd..56dc8967b975 100644 --- a/ext/search_kit/Civi/Api4/Action/SearchDisplay/GetDefault.php +++ b/ext/search_kit/Civi/Api4/Action/SearchDisplay/GetDefault.php @@ -72,6 +72,7 @@ public function _run(\Civi\Api4\Generic\Result $result) { 'show_count' => TRUE, 'expose_limit' => TRUE, ], + 'placeholder' => 5, 'sort' => [], 'columns' => [], ], diff --git a/ext/search_kit/ang/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.component.js b/ext/search_kit/ang/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.component.js new file mode 100644 index 000000000000..452945487399 --- /dev/null +++ b/ext/search_kit/ang/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.component.js @@ -0,0 +1,27 @@ +(function(angular, $, _) { + "use strict"; + + angular.module('crmSearchAdmin').component('searchAdminPlaceholderConfig', { + bindings: { + display: '<', + }, + templateUrl: '~/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.html', + controller: function($scope) { + var ts = $scope.ts = CRM.ts('org.civicrm.search_kit'), + ctrl = this; + + this.$onInit = function() { + // Legacy support + if (!('placeholder' in this.display.settings)) { + this.display.settings.placeholder = 5; + } + }; + + this.togglePlaceholder = function() { + this.display.settings.placeholder = this.display.settings.placeholder ? 0 : 5; + }; + + } + }); + +})(angular, CRM.$, CRM._); diff --git a/ext/search_kit/ang/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.html b/ext/search_kit/ang/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.html new file mode 100644 index 000000000000..a988a9060960 --- /dev/null +++ b/ext/search_kit/ang/crmSearchAdmin/displays/common/searchAdminPlaceholderConfig.html @@ -0,0 +1,9 @@ +