diff --git a/Civi/Api4/Service/Autocomplete/CountryAutocompleteProvider.php b/Civi/Api4/Service/Autocomplete/CountryAutocompleteProvider.php new file mode 100644 index 000000000000..d047bbcb3698 --- /dev/null +++ b/Civi/Api4/Service/Autocomplete/CountryAutocompleteProvider.php @@ -0,0 +1,50 @@ +display['settings'] || $e->display['type'] !== 'autocomplete' || $e->savedSearch['api_entity'] !== 'Country') { + return; + } + $e->display['settings'] = [ + 'sort' => [ + ['name', 'ASC'], + ], + 'columns' => [ + [ + 'type' => 'field', + 'key' => 'name', + ], + [ + 'type' => 'field', + 'key' => 'iso_code', + ], + ], + ]; + } + +}