From 68cb8d9965b87b3d6b23cdcfa4f4c2dc82d61684 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Fri, 29 Apr 2022 10:36:53 +0200 Subject: [PATCH] Formatting file --- .../controllers/tom_select_controller.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/webpacker/controllers/tom_select_controller.js b/app/webpacker/controllers/tom_select_controller.js index e1b7a65dfb..9eae0879fe 100644 --- a/app/webpacker/controllers/tom_select_controller.js +++ b/app/webpacker/controllers/tom_select_controller.js @@ -1,22 +1,23 @@ -import { Controller } from "stimulus" -import TomSelect from "tom-select" +import { Controller } from "stimulus"; +import TomSelect from "tom-select"; export default class extends Controller { - static values = { options: Object } + static values = { options: Object }; static defaults = { maxItems: 1, maxOptions: null, plugins: ["dropdown_input"], - allowEmptyOption: true - } + allowEmptyOption: true, + }; connect() { - this.control = new TomSelect( - this.element, { ...this.constructor.defaults, ...this.optionsValue } - ) + this.control = new TomSelect(this.element, { + ...this.constructor.defaults, + ...this.optionsValue, + }); } disconnect() { - if (this.control) this.control.destroy() + if (this.control) this.control.destroy(); } }