From 1ca354439aac5bf68d6d7cf3f27a8b7e00d96e52 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Thu, 14 Mar 2024 08:23:50 +0200 Subject: [PATCH] UHF-9576: Switch field widget to select2_entity_reference --- ...e.entity_form_display.paragraph.event_list.default.yml | 7 ++++--- modules/helfi_react_search/helfi_react_search.info.yml | 1 + modules/helfi_react_search/helfi_react_search.install | 8 ++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/helfi_react_search/config/install/core.entity_form_display.paragraph.event_list.default.yml b/modules/helfi_react_search/config/install/core.entity_form_display.paragraph.event_list.default.yml index 751e4cf2a..806a0a470 100644 --- a/modules/helfi_react_search/config/install/core.entity_form_display.paragraph.event_list.default.yml +++ b/modules/helfi_react_search/config/install/core.entity_form_display.paragraph.event_list.default.yml @@ -14,6 +14,7 @@ dependencies: - paragraphs.paragraphs_type.event_list module: - link + - select2 - text id: paragraph.event_list.default targetEntityType: paragraph @@ -65,14 +66,14 @@ content: display_label: true third_party_settings: { } field_filter_keywords: - type: entity_reference_autocomplete_tags + type: select2_entity_reference weight: 8 region: content settings: + width: 100% + autocomplete: true match_operator: CONTAINS match_limit: 10 - size: 60 - placeholder: '' third_party_settings: { } field_free_events: type: boolean_checkbox diff --git a/modules/helfi_react_search/helfi_react_search.info.yml b/modules/helfi_react_search/helfi_react_search.info.yml index 04e04eb91..eeb7cccf3 100644 --- a/modules/helfi_react_search/helfi_react_search.info.yml +++ b/modules/helfi_react_search/helfi_react_search.info.yml @@ -11,6 +11,7 @@ dependencies: - 'drupal:text' - 'drupal:taxonomy' - 'drupal:migrate' + - 'select2:select2' - 'helfi_platform_config:helfi_platform_config' - 'readonly_field_widget:readonly_field_widget' - 'paragraphs:paragraphs' diff --git a/modules/helfi_react_search/helfi_react_search.install b/modules/helfi_react_search/helfi_react_search.install index b86c1540e..a99a1710c 100644 --- a/modules/helfi_react_search/helfi_react_search.install +++ b/modules/helfi_react_search/helfi_react_search.install @@ -111,3 +111,11 @@ function helfi_react_search_update_9007() : void { \Drupal::service('helfi_platform_config.config_update_helper') ->update('helfi_react_search'); } + +/** + * UHF-9576: Linked events: change paragraph widget. + */ +function helfi_react_search_update_9008() : void { + \Drupal::service('helfi_platform_config.config_update_helper') + ->update('helfi_react_search'); +}