Skip to content

Commit 7c96b15

Browse files
committed
'changes' => 'watchers', 'retreives' => 'loads'
1 parent 178a2f9 commit 7c96b15

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

resources/js/calendar/clock_collapsible.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import CollapsibleComponent from "./collapsible_component";
22

33
class ClockCollapsible extends CollapsibleComponent {
4-
key = 'clock';
5-
retrieves = {
4+
loads = {
65
'clock': 'clock'
76
};
8-
changes = {
7+
8+
watchers = {
99
'clock': this.changed
1010
};
1111

resources/js/calendar/collapsible_component.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default class CollapsibleComponent {
22
initialized = false;
33
retrieves = {};
4-
changes = {};
4+
watchers = {};
55

66
load(static_data) {
77
if (!static_data) {
@@ -15,8 +15,8 @@ export default class CollapsibleComponent {
1515
this.calendar_settings = static_data.settings;
1616

1717
if (!this.initialized) {
18-
for (let localKey of Object.keys(this.changes)) {
19-
this.$watch(localKey, this.changes[localKey].bind(this));
18+
for (let localKey of Object.keys(this.watchers)) {
19+
this.$watch(localKey, this.watchers[localKey].bind(this));
2020
}
2121

2222
this.initialized = true;
@@ -28,8 +28,4 @@ export default class CollapsibleComponent {
2828
loaded(static_data) {
2929
// throw new Error(`The component ${this.prototype.constructor.name} must implement 'changed()'!`);
3030
}
31-
32-
changed() {
33-
// throw new Error(`The component ${this.prototype.constructor.name} must implement 'changed()'!`);
34-
}
3531
}

0 commit comments

Comments
 (0)