diff --git a/app/webpacker/controllers/tom_select_controller.js b/app/webpacker/controllers/tom_select_controller.js index ebf163d129..9cf4401fe6 100644 --- a/app/webpacker/controllers/tom_select_controller.js +++ b/app/webpacker/controllers/tom_select_controller.js @@ -8,6 +8,7 @@ export default class extends Controller { maxOptions: null, plugins: ["dropdown_input"], allowEmptyOption: true, + closeAfterSelect: true, onItemAdd: function () { this.setTextboxValue(""); }, @@ -34,7 +35,6 @@ export default class extends Controller { #placeholder() { const optionsArray = [...this.element.options]; - return optionsArray.find((option) => [null, ""].includes(option.value)) - ?.text; + return optionsArray.find((option) => [null, ""].includes(option.value))?.text; } }