From 79ba85ccaa6a79da43afccf424d8883552e9ec60 Mon Sep 17 00:00:00 2001 From: V13Axel Date: Thu, 19 Dec 2024 18:37:46 -0500 Subject: [PATCH] Yeet the init function in favor of setupWatchers, running after first load --- resources/js/calendar/collapsible_component.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/js/calendar/collapsible_component.js b/resources/js/calendar/collapsible_component.js index 9f5154db..2af52a8c 100644 --- a/resources/js/calendar/collapsible_component.js +++ b/resources/js/calendar/collapsible_component.js @@ -15,7 +15,6 @@ export default class CollapsibleComponent { collapsible_name = "Not set on the individual component?!?"; load($store) { - this.calendar_settings = $store.calendar.static_data.settings; for (let [localKey, globalKey] of Object.entries(this.inboundProperties)) { @@ -28,9 +27,15 @@ export default class CollapsibleComponent { } this.loaded($store.calendar.static_data); + + if (!this.initialized) { + this.setupWatchers(); + } } - init() { + setupWatchers() { + this.initialized = true; + const componentProperties = Array.from(new Set( Object.keys(this.changeHandlers).concat(Object.keys(this.outboundProperties)) ));