diff --git a/app/components/satis/dropdown/component_controller.js b/app/components/satis/dropdown/component_controller.js index 66a76273..880a1e44 100644 --- a/app/components/satis/dropdown/component_controller.js +++ b/app/components/satis/dropdown/component_controller.js @@ -355,6 +355,9 @@ export default class DropdownComponentController extends ApplicationController { } setHiddenSelect() { + if (this.element.querySelector('select[name*="[TEMPLATE]"]')) { + return + } if (this.hiddenSelectTarget.options.length === 0) { this.searchInputTarget.value = "" this.pillsTarget.innerHTML = "" diff --git a/app/javascript/satis/controllers/fields_for_controller.js b/app/javascript/satis/controllers/fields_for_controller.js index 7721b0c4..a63ff016 100644 --- a/app/javascript/satis/controllers/fields_for_controller.js +++ b/app/javascript/satis/controllers/fields_for_controller.js @@ -132,7 +132,7 @@ export default class FieldsForController extends ApplicationController { } monitorChanges(event) { - if (event?.detail?.src == "satis-dropdown") { + if (event?.detail?.src == "satis-dropdown" || event?.detail?.src == "prepopulate" ) { // Skip events caused by the initial load of a satis-dropdown return }