Skip to content

Commit

Permalink
Yeet the init function in favor of setupWatchers, running after first…
Browse files Browse the repository at this point in the history
… load
  • Loading branch information
V13Axel committed Dec 19, 2024
1 parent 7b4cb57 commit 79ba85c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions resources/js/calendar/collapsible_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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))
));
Expand Down

0 comments on commit 79ba85c

Please sign in to comment.